Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Here is my code: ActiveWorkbook.RefreshAll 'runs query from access and updates in excel ActiveSheet.Calculate ActiveWorkbook.Save 'where the macro fails ActiveWorkbook.Close ----------------------------- Problem is that the Refreshall does not complete and goes to the nex command. I get a msg box that pops up writes "This action will cance a pending Refresh Data Command. Continue?" So if I say "yes" the data does not refresh but finishes macro but i say "no" the macro does not finish. I tried to enter a wait code: newHour = Hour(Now()) newMinute = Minute(Now()) newSecond = Second(Now()) + 30 waitTime = TimeSerial(newHour, newMinute, newSecond) Application.Wait waitTime but this does not help. Anyone have any suggestions? Thanks -- NCSU_madma ----------------------------------------------------------------------- NCSU_madman's Profile: http://www.excelforum.com/member.php...fo&userid=1631 View this thread: http://www.excelforum.com/showthread.php?threadid=27702 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Wait statement in macro | Excel Discussion (Misc queries) | |||
sendkeys(keys,wait) how do I use wait | Excel Discussion (Misc queries) | |||
Macro wait 30 seconds then Complete the Macro | Excel Discussion (Misc queries) | |||
row that needs to wait till the next page break befor copying | Excel Discussion (Misc queries) | |||
Macro to nsert value from table, then next value, till done | Excel Programming |