LottieRoseC
New Member
- Joined
- May 24, 2012
- Messages
- 1
Macro - Run Time 91 Error
Hi,
I have an excel document that is linked to access, and a macro runs to refresh all of the links and the pivots in excel that run off the data. My spreadsheet was working fine, and refreshing, but now when I run the Macro to refresh everything I get a Run Time error 91 Object Variable or With Block Variable not set. If I go to debug it highlights the following part of the code
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
I have checked that all the tables will refresh manually (which they do) and the connections all work. Does anyone know what the problem is?
Thanks
Hi,
I have an excel document that is linked to access, and a macro runs to refresh all of the links and the pivots in excel that run off the data. My spreadsheet was working fine, and refreshing, but now when I run the Macro to refresh everything I get a Run Time error 91 Object Variable or With Block Variable not set. If I go to debug it highlights the following part of the code
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
I have checked that all the tables will refresh manually (which they do) and the connections all work. Does anyone know what the problem is?
Thanks