Hi. I am getting error "Subscript out of range" on below simple code. Can anybody explain why. Thank you very much.
Please Login or Register to view this content.
Hi. I am getting error "Subscript out of range" on below simple code. Can anybody explain why. Thank you very much.
Please Login or Register to view this content.
My guess would be that book1.xls is misspelt. Perhaps it's .xlsm.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
Hello Itselflearn,
That particular error usually means that the code can't find the destination book or sheet.
If you are trying to paste into another work book, make sure that it is open.
If you are trying to paste into the same work book, check that all spelling is correct (book1 or Book1?) including cases and punctuation. Also check that the file extension is the correct type (xls or xlsx etc.)
Cheerio,
vcoolio.
mikerickson and vcoolio - thank you so much for your help. you are right. the file names has chganged to book1.xlsm. it is now working. thank you.
You're welcome.
By the way, the argument of Workbooks is case insensitive.
Please Login or Register to view this content.
Hello Itselflearn,
You're welcome. Glad we could help.
Cheerio,
vcoolio.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks