HELP! I revised a macro for a client, and now it gives him a run-time error. Macro used to allow user to select ONE file for processing. Client wanted to select multiple files, and have the macro process them one after another. So I just added a loop and changed the code to allow selection of multiple files. The loop increments a counter to open and process each file.
Problem: The macro runs fine for me (it will open and process multiple files as desired, with NO errors). I'm running Excel 2007. Client is running Microsoft 365 and the macro bombs for him. It opens and processes the first file just fine, but throws the run-time error when it tries to get the filename and path for the second selected item. Any ideas on what the cause / fix could be?
Here is the relevant portion of the code. Sets a run-time error 5 (Invalid procedure call or argument) at the "FilePath = ..." statement, when FileCounter = 2
![]()
Please Login or Register to view this content.
Bookmarks