Hi all
I wrote below code to refer to another work but got runtime 09 error, would you please point out what mistake I had made?
Please Login or Register to view this content.
Hi all
I wrote below code to refer to another work but got runtime 09 error, would you please point out what mistake I had made?
Please Login or Register to view this content.
Hi,
You have to open the other workbook before you can read values from it (unless you use ADO).
Please Login or Register to view this content.
Thanks and I fixed the problem.
One more question, is it not necessary to provide the full path of the file? as I found problem in below code:
but fine for below:Please Login or Register to view this content.
Please Login or Register to view this content.
Last edited by MingVBA; 06-30-2011 at 08:55 AM.
When you are opening the file, it's better to use the full file path, otherwise it assumes the current directory. Once the file is open and you want to refer to it in the Workbooks collection, don't use the full path - as per your example.
Thank you so much!
If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.
---Keep on Coding in the Free World---
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks