PDA

View Full Version : Sleeper: Pause a Macro



Belgarth
03-26-2006, 06:24 AM
This message has been cross-posted here (http://www.mrexcel.com/board2/viewtopic.php?t=203210) (click here (http://www.excelguru.ca/XLKBA/XLKBA05.htm) for an explanation of cross-posting)

Is it possible to pause a macro, ie after starting my macro and selecting all my worksheets i want to be able to press Ctrl+F and then pause my macro, enter data and resume, is this possible ????

Cheers

Edited by geekgirlau on 27-Mar-06, 20:39 EST; Reason: cross post

mdmackillop
03-26-2006, 07:50 AM
Hi Belgarth
Welcome to VBAX
Why not add an InputBox to your code to accept your data and write it to the required locations
Regards
MD

Belgarth
03-26-2006, 08:00 AM
I would if I knew how to go about it, i`m new to VBA, is it posible to show me how please ?

mdmackillop
03-26-2006, 08:02 AM
I'll do that. Can you post the code that you have?

mdmackillop
03-26-2006, 08:19 AM
Here's an example to write some text into cell A3 of all sheets


Sub Macro1()
Dim ws As Worksheet
Set ws = ActiveSheet
Sheets.Select
Range("A3").Formula = InputBox("Enter your data")
ws.Select
Set ws = Nothing
End Sub

Norie
03-26-2006, 09:17 AM
Cross post. (http://www.mrexcel.com/board2/viewtopic.php?t=203210)