Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Go back to last step in programming

Dear all
we all know when we're working in excel normally by using ctrl+z we
can go to the last step. While using VBA i found we can't go back to
the last step,
whats your suggestion?
Always create a backup file?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 538
Default Go back to last step in programming

TIMOTHY wrote:

we all know when we're working in excel normally by using ctrl+z we
can go to the last step. While using VBA i found we can't go back to
the last step,
whats your suggestion?
Always create a backup file?


Save before you run your macro. If you don't like the results, close without
saving and re-open.

--
You left me incomplete, all alone as the memories still remain.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Go back to last step in programming

On Friday, September 21, 2012 11:09:33 PM UTC-4, TIMOTHY wrote:
Dear all

we all know when we're working in excel normally by using ctrl+z we

can go to the last step. While using VBA i found we can't go back to

the last step,

whats your suggestion?

Always create a backup file?


I assume this is for debug or for an incorrect user menu action.

If its a single worksheet issue, add a program line to copy the sheet before the action and provide a breakpoint or input to "undo" which, would then delete the now defective original sheet and rename the copy back to the original sheet name and loop back to the menu. If fact, for complicated sheet code development, my first macro code action would be to copy the original data sheet before continued modification so I can simply delete the sheet with bug issues. Also,I always keep my code in separate vb module(s) from the worksheets except for buttons which only call a module subroutine.

If a multisheet issue, have your code in a separate workbook and add a program line to copy the the target workbook before the action and provide the "undo" to close the defective workbook, delete it, rename the copy and open the saved copy.
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
How do I pass a value from an event back to my VBA Programming enviornment. Mac Lingo Excel Programming 2 September 21st 08 09:10 PM
How to "Step Back" clara Excel Programming 7 April 13th 07 12:18 PM
Restore all formatting in one step back to a cell? Ava[_3_] Excel Programming 7 August 19th 05 02:26 AM
Step back Weng-Kit Tan Excel Programming 1 August 3rd 04 10:57 AM


All times are GMT +1. The time now is 01:52 PM.

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

About Us

"It's about Microsoft Excel"