I'm a new to VB Forums and new to VB code as well so excuse me if there is something obvious I am missing. I am running code that produces a Runtime Error 7 message on the following code
And errors out on the refresh. It works on other sheets just not this one and sometimes this one works and others do not. The code works fine by itself but when run with others, it gives me the error. The debugger claims it is the "Range("RefreshRange").QueryTable.Refresh" That has the problem. Once again, sometimes it works sometimes it doesn't. The range refreshed is web data. Thanks for your help.Code:Sheets("DIYGO").Select Range("D2:D45").Name = "RefreshRange" Range("RefreshRange").QueryTable.Refresh




Reply With Quote