I don't know why my VBA code got Subscript Out of Range. Can anybody please look at my code.
Please Login or Register to view this content.
Please Login or Register to view this content.
I don't know why my VBA code got Subscript Out of Range. Can anybody please look at my code.
Please Login or Register to view this content.
Please Login or Register to view this content.
There is nothing obviously wrong with the code, so it may be the data. When this runs, and the error occurs, show the value of filepath in the debugger. If it is null then Split will return an empty array and you will get that error trying to index it.
Thank you so much looking my code, and I have found the problem.
If InStr(filename, DealFileNames) <> 0 ThenPlease Login or Register to view this content.
DealFileNames ---> should be DealFileName
anyway, really appreciate you spending time look at the error.
Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks