Inserting a break into a macro?

C

carl0s66

I want my macro to stop, allow the user to paste information from th
clipboard, then carry on.

So basically it pauses at the same point in the macro every time, unti
the user pastes the data, then carries on.

Simple idea but..
 
C

carl0s66

Had an idea, the data will always be pasted to cell a1.

can i get a looped test that calls the rest of my macro as a seaprat
Sub should A1 be found to be anything but Null?

In other words will I be able to paste to the sheet while the macr
runs, or will it not let the user input data and/or loop an infinit
number of times and blow up the pc
 
G

Gary Brown

If the information is already in the clipboard, instead of stopping the
macro, include the process in the macro.
1) Ask for the cell to paste the information into with something like...
dim rng as range
Set rng = Application.InputBox(prompt:="Select Cell to be Copied to: ", _
Title:="Copy To...", _
Default:=Application.Selection.Address, Type:=8)
2) Paste from the clipboard with something like...
'for regular paste
rng.Select
ActiveSheet.Paste
or
'for paste special values
rng.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

HTH,
Gary Brown
 
Top