Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating excel file, adding code to it from code, VBE window stays | Excel Programming | |||
How can I modify my code to offset the defined range and repeat theprocedure instead of duplicating my code? | Excel Programming | |||
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |