»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 11-25-2003, 10:26 AM   #1 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 31
jjst34 is on a distinguished road
Excel "Undo" in VBA code??

Is there a way to write a small piece of code that will undo the last thing entered into any given cell??? Just like the undo command? If it matters I am using Excel 97. Thanks!

jjst34 is offline   Reply With Quote
Old 11-25-2003, 06:50 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2003
Posts: 31
HeddaLora is on a distinguished road
I don't know what the VBScript code would be for it, but why not just use "control-z" ? (I suppose if you really had to have it in code, you could put "control-z" in the code.)

Hedda Lora
HeddaLora is offline   Reply With Quote
Old 11-26-2003, 06:14 AM   #3 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 31
jjst34 is on a distinguished road
Quote:
Originally posted by HeddaLora
I don't know what the VBScript code would be for it, but why not just use "control-z" ? (I suppose if you really had to have it in code, you could put "control-z" in the code.)

Hedda Lora
I needed it in code because I have a sheet that other users will be using.. I put in a piece of code that will not allow the value of a formula in a cell to go over a certain percentage.. If it does it brings up a message that tells the user, but when they hit ok or cancel it allows the previous entry, so I needed to "force" an undo...
Anyways,, the way to do it, I found out is to put
application.undo
in the code.. pretty simple! thanks for ur suggestion though
jjst34 is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 03:17 AM.