Hello,
I am running a macro which refers to a file on a different drive.
If I run the macro with the file not opened, I get an error. However, if I get the macro to open the file, and then execute the code - it runs as expected.
The code I am trying to run is :-
Can someone confirm if a file has to be open in this type of instance.With myBook.Sheets("Sheet1") Set RngM = .Range(.Range("B2"), .Range("B" & Rows.Count).End(xlUp)) End With
Thanks
Hard to tell, since from your code it's not obvious that you are referencing another file.
Just live with the fact that some stuff only works when the other file is open.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks