Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default undo in code

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default undo in code

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


"lrisser" wrote in message
...
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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default undo in code

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


-----Original Message-----
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.

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
VBA code to undo previous VBA action Preschool Mike Excel Discussion (Misc queries) 6 October 2nd 09 03:57 PM
UNDO - how many times can I UNDO? Jane Excel Worksheet Functions 2 May 19th 05 03:03 AM
Why is my undo function in Excel only can undo the last 1 or 2 ch. 1111111111111111111111111111111111111111 Excel Worksheet Functions 1 November 24th 04 11:13 AM
Setting Font properties in Code clears Undo list Lorin Excel Programming 2 July 10th 03 09:49 PM


All times are GMT +1. The time now is 09:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"