Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to schedule reports to rn in excel using the open event,
but obviously might need to change the code, so when I run it I want it to pop a box and ask if it should run and give me 10-20 seconds to click no so I can amend the code. The idea is the workbook opens, pops a box asking if its OK to run with a count down preferably, run the code if it receives no input. I know about mode/modeless userforms and have tried using the "wait" command, but that doesnt let you stop the code using the button. Is there a do loop or a for next I can use and update a label on a form to tell me how long I have. Quite new to this. Any ideas gratefully received. Thanks john |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Figured it out, just in case someone else needs it.
Sub testwait() UserForm1.Show vbModeless TimedDelay 9 MsgBox "wait over" End Sub Sub TimedDelay(sec As Single) Dim x As long x = Timer + sec Do While Timer < x nSec = Round(x - Timer, 0) UserForm1.Label3 = nSec DoEvents Loop End Sub Thanks John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Input Box Question with Code | Excel Programming | |||
Input Box Code Please Help!! | Excel Programming | |||
Code for Input Box | Excel Programming | |||
pause for input during macro | Excel Programming | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |