undo in code

  • Thread starter Thread starter lrisser
  • Start date Start date
L

lrisser

I've written a function that validates whether data entry
into a cell matches a list of approved entries, and brings
up a message box to tell the user of an invalid entry. I
would also like the code to undo the last entry. I've
tried using sendkeys "^Z" but that doesn't seem to do it.
Any suggestions.

thanks in advance.
 
You can't do an undo for actions carried out by code. The best you could do
is write a macro that can do the opposite of the other macro.
--
RMC,CPA


I've written a function that validates whether data entry
into a cell matches a list of approved entries, and brings
up a message box to tell the user of an invalid entry. I
would also like the code to undo the last entry. I've
tried using sendkeys "^Z" but that doesn't seem to do it.
Any suggestions.

thanks in advance.
 
If you mean undo the last entry if it wasn't an approved
entry then isn't the Data Validation utility tailor made
for this? No need for the custom macro either.

Regards,
Greg
 
I think this OP has not used the normal data validation provided and has
built their own with code. They said they wrote a function. I guess that
will keep them from going the easy route. Makes you wonder if they could
have used the normal validation techniques.
--
RMC,CPA


If you mean undo the last entry if it wasn't an approved
entry then isn't the Data Validation utility tailor made
for this? No need for the custom macro either.

Regards,
Greg
 
Back
Top