Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macros -"OK buttons" part way through ?
Is it possible to create a macro that -displays a message window, and -requires the user to click on an OK button, before the macro can finish? If so, how is it done? Or does it need to be done with separate macros, one to start the process, and one that is activated when you click on an OK button created by the first macro? Thanks in advance for any help. -- dyl ------------------------------------------------------------------------ dyl's Profile: http://www.excelforum.com/member.php...o&userid=28671 View this thread: http://www.excelforum.com/showthread...hreadid=518638 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macros -"OK buttons" part way through ?
Try:
Msgbox "Press OK to continue" HTH -- AP "dyl" a écrit dans le message de ... Is it possible to create a macro that -displays a message window, and -requires the user to click on an OK button, before the macro can finish? If so, how is it done? Or does it need to be done with separate macros, one to start the process, and one that is activated when you click on an OK button created by the first macro? Thanks in advance for any help. -- dyl ------------------------------------------------------------------------ dyl's Profile: http://www.excelforum.com/member.php...o&userid=28671 View this thread: http://www.excelforum.com/showthread...hreadid=518638 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
macros -"OK buttons" part way through ?
dyl Wrote: Is it possible to create a macro that -displays a message window, and -requires the user to click on an OK button, before the macro can finish? If so, how is it done? Or does it need to be done with separate macros, one to start the process, and one that is activated when you click on an OK button created by the first macro? Thanks in advance for any help. Yes you can, by using a message window to request a response from a user - and do whatever you want depending upon the response. If you check out VBA help on message boxes you get the following example: -------------------- Dim Msg, Style, Title, Help, Ctxt, Response, MyString Msg = "Do you want to continue ?" ' Define message. Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons. Title = "MsgBox Demonstration" ' Define title. Help = "DEMO.HLP" ' Define Help file. Ctxt = 1000 ' Define topic ' context. ' Display message. Response = MsgBox(Msg, Style, Title, Help, Ctxt) If Response = vbYes Then ' User chose Yes. MyString = "Yes" ' Perform some action. Else ' User chose No. MyString = "No" ' Perform some action. End If -------------------- You could embody this in your existing macro to halt operation until you get the desired reponse. Hope this helps Astrikor -- astrikor ------------------------------------------------------------------------ astrikor's Profile: http://www.excelforum.com/member.php...o&userid=31465 View this thread: http://www.excelforum.com/showthread...hreadid=518638 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Need macro to auto set option buttons all to "Yes" or "No" | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Shortcut key for "Paste Options" and "Error Checking" buttons? | Excel Discussion (Misc queries) | |||
"openinf file..."ENABLE MACROS...DISABLE MACROS" | Excel Discussion (Misc queries) | |||
Standard "Open" and "Save As" Buttons | Excel Programming |