Trying to load a range into VB from another workbook, but getting an error:
ThanksPlease Login or Register to view this content.
Trying to load a range into VB from another workbook, but getting an error:
ThanksPlease Login or Register to view this content.
You either quit or become really good at it. There are no other choices.
If ABCDE is meant to be a text string, it's not, it's an undefined variable and hence it is empty/null. Put it in double quotes ... "ABCDE".
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Ooops.... In the original code it is a string. My mistake, sorry. I just forgot to put it in quotes here.
I got it to work finally, but with a rather long line. Is this the only way that this can be done using "Cells(...." Seems like there should be a shorter method. Trying to avoid using Range("A3:T62") format where I have to refer to columns by letters instead of numbers.
Please Login or Register to view this content.
Last edited by luv2glyd; 04-17-2016 at 09:49 AM.
Maybe this (untested):
Please Login or Register to view this content.
Ok, that will work quite a bit better. Thanks!
PS: for anyone looking at this in the future - did some testing and realize I can just do this:
Please Login or Register to view this content.
Last edited by luv2glyd; 04-23-2016 at 12:00 AM.
Not quite sure why I wrote it like that . Using "With" means I can write:
And thanks for the repPlease Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks