Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pause Macro

Status
Not open for further replies.

skygirl65

Technical User
Jul 18, 2004
32
US
I have a simple macro in excel that I would like to change the date in the header before moving on... how do I tell the macro to pause and wait for me to type in the Month?
 


Hi,

You can dan input prompt using the InputBox Function.

Skip,
[sub]
[glasses] [red]Be Advised![/red] The Vinyards of Texas have produced a wine with diuretic dimishment...
Pinot More![tongue][/sub]
 
In the future, please post macro questions in the VBA forum (forum707 - VBA Visual Basic for Applications (Microsoft) Forum).

You can interupt a macro by pressing [Escb], but why not have the macro prompt you for the month?
Code:
...
MyDate = inputbox "Please enter the Date you would like to appear in the header"
...
You could get fancier and change how it appears vs. how you enter it. But if you need further help, please start a new thread in forum707.

[tt]_____
[blue]-John[/blue][/tt]

Help us help you. Please read FAQ181-2886 before posting.
 
That was supposed to be [Esc], not [Escb].

[tt]_____
[blue]-John[/blue][/tt]

Help us help you. Please read FAQ181-2886 before posting.
 
Alternatively, if you simply want to enter the data into a cell, you can use

Code:
.....code runs

stop

.....code restarts

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top