TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 303
- Office Version
- 365
- Platform
- Windows
Apologies, I am having a brain freeze.
I am running a macro from a workbook (A) which opens another workbook (B) and then copies data from (B) to (A).
I have this
If I go into workbook (B) and manually select the sheet (which is named "contracts") and then continue with the code execution, it works fine.
What code do I need to make it work? Apparently this used to work fine up until recently (although I'm not sure why).
Thanks as always for any pointers.
I am running a macro from a workbook (A) which opens another workbook (B) and then copies data from (B) to (A).
I have this
VBA Code:
Workbooks.Open filename:=folder & "\" & filename & ".xlsm", Notify:=False, ReadOnly:=True, Password:="lh01"
Range("Table1[[Contract No]:[Email Address]]").Select ' falls over here with "select method of Range Class failed"
If I go into workbook (B) and manually select the sheet (which is named "contracts") and then continue with the code execution, it works fine.
What code do I need to make it work? Apparently this used to work fine up until recently (although I'm not sure why).
Thanks as always for any pointers.