Why when I use hide columns / rows the undo does not work.

N

Nils

When I put commands in the spreadsheet with the right
click and view code, then following this, the undo command
no longer works. However, after I remove the code it (the
undo) works again. Can you explain?
=====================================================

Private Sub Worksheet_Change(ByVal Target As Range)
Set TestCell = Range("AZ19")
TestValue = "x"
If TestCell = TestValue Then

Range("A18:a20").EntireRow.Hidden = True
Else
Range("A18:a20").EntireRow.Hidden = False
End If


End Sub
=======================================================

Thanks Nils!
 
J

J.E. McGimpsey

Many macro functions reset XL's Undo. Since XL can't tell what was
done in the macro, it doesn't allow undo's after the macro was run.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top