help with code
On Thursday, June 7, 2012 3:20:42 PM UTC-5, bobh wrote:
Hi All,
I have this code below and it error on the line -- wks.Select with
the error message error 1004.
Any ideas of what I'm doing wrong and how to fix it.
Thanks
bobh.
Set sh = Worksheets(Array("TBL BUDGET", "TBL S2B", "TBL PAYCODE",
"table1 rev"))
For Each wks In sh
wks.Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Next wks
You don't have to select however you probably have a typo on a sheet name.
Try it with wks.select and a msgbox "HI"
On Thursday, June 7, 2012 3:20:42 PM UTC-5, bobh wrote:
Hi All,
I have this code below and it error on the line -- wks.Select with
the error message error 1004.
Any ideas of what I'm doing wrong and how to fix it.
Thanks
bobh.
Set sh = Worksheets(Array("TBL BUDGET", "TBL S2B", "TBL PAYCODE",
"table1 rev"))
For Each wks In sh
wks.Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Next wks
|