Problem with "Runtime Error 9 - subscript out of range" for arrays

  • Hi all I am recently trying to code a vba macro to retrieve data from multiple sheets with different formats and paste them together in one masterlist. With a relatively large amount of data involved, I have decided to use arrays to store data i retrieved from other workbooks.


    Here is a copy of the array codes involved:


    However I am encountering errors from a particular line of code "Set intelWbook = Workbooks(wbName)" which has the error 9 out of range error. Please help!

  • That just means that the workbook name in question isn't open.


    Note: please use code tags when posting code - I've added them for you this time.

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!