can't undo

D

DPW1

I can't undo after using a macro that does paste special formulas. Following
is the macro:

Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End
 
J

Jim Cone

Undo does work with macros.
You have to write specific code to undo the macro.
One could give the user an option to undo -
say a button to click - then run the undo code.

Jim Cone
San Francisco, USA.

I can't undo after using a macro that does paste special formulas. Following
is the macro:

Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End
 
G

George Nicholson

AFAIK Undo only applies to actions taken *by the user*. It cannot be used
to undo Visual Basic commands (or macros, which are the same thing).

Similar to what it says in the VB Help entry for the Undo method.
 
J

Jim Cone

Left out an important word.
Text should read...

"Undo does not work with macros"

Jim Cone


Undo does work with macros.
You have to write specific code to undo the macro.
One could give the user an option to undo -
say a button to click - then run the undo code.

Jim Cone
San Francisco, USA.

I can't undo after using a macro that does paste special formulas. Following
is the macro:
Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End
 
Top