Pausing the program...

efarach

New Member
Joined
Jan 8, 2018
Messages
2
I would like to direct, by way of a MsgBox, the user to select a pull-down cell and obtain a selection and then continue the program operation. How and what VBE coding will accomplish this?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Re: Pausing t he program...

Create a userform. End one macro with calling the userform. When they enter their input, call a new macro which passes the input from the userform as an argument.
 
Upvote 0
Re: Pausing t he program...

Another approach: When you run this macro, it will prompt the user to make a selection. When you click "OK", you have 3 seconds to make a selection and then the macro will display a message box with "OK". Change the '3' to the number of seconds you want to allow and replace the line of code that displays "OK" with your code.
Code:
Sub x()
    Dim WaitTime As Date
    MsgBox "Make a selection in the drop down list."
    WaitTime = Now() + TimeValue("00:00:03")
    While Now() < WaitTime
        DoEvents
    Wend
    MsgBox "OK"
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top