Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a seeming simple task that I can't figure out.
I have a macro set up to refresh a query and then do some copying and pasting of cells. What code can I use to tell the macro to wait until the query is finished refreshing until it does the copy and paste? Here is the simple code. Sub GetData() ThisWorkbook.RefreshAll ' I need the following code to be run after the refresh is finished' Range("J5").Select Selection.Copy Range("J6:J65000").Select ActiveSheet.Paste Application.CutCopyMode = False ActiveWindow.LargeScroll ToRight:=-1 Range("D1").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Code stops when high lighting (Chips code) | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming |