ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Undo button?? (https://www.excelbanter.com/excel-programming/350826-undo-button.html)

Bruise[_2_]

Undo button??
 
Has anyone ever heard of a code that would function as an undo button? My
spreadsheet requires staff to make many entries throughout the day.
Sometimes they get distracted with phone calls and lose their spot. I would
like to add an 'undo' button that would 'undo' their last 1 or 2 entries. I
thought of just closing without saving, but then they would lose all their
other entries, as well.

Any suggestions?

TIA...
Mark



RB Smissaert

Undo button??
 
You will need to keep track of all the changes in such a way that you can
trace back.
For example you could make a VBA collection holding 1-D arrays with 4
elements.

In these array elements you would then have:
Row number
Column number
Cell text or value before change
Cell text or value after change

Any changed cell would add an item to the collection with this information.
If something goes wrong you would just trace back x number of steps.
You would need to work it all out, but it is fairly simple.

RBS



"Bruise" <mkrupiarzATshaw.ca wrote in message
...
Has anyone ever heard of a code that would function as an undo button? My
spreadsheet requires staff to make many entries throughout the day.
Sometimes they get distracted with phone calls and lose their spot. I
would like to add an 'undo' button that would 'undo' their last 1 or 2
entries. I thought of just closing without saving, but then they would
lose all their other entries, as well.

Any suggestions?

TIA...
Mark




davegb

Undo button??
 

Bruise wrote:
Has anyone ever heard of a code that would function as an undo button? My
spreadsheet requires staff to make many entries throughout the day.
Sometimes they get distracted with phone calls and lose their spot. I would
like to add an 'undo' button that would 'undo' their last 1 or 2 entries. I
thought of just closing without saving, but then they would lose all their
other entries, as well.

Any suggestions?

TIA...
Mark


Maybe I'm naive, but what's wrong with the Undo button?


RB Smissaert

Undo button??
 
You can't trace back very far with that.

RBS

"davegb" wrote in message
ups.com...

Bruise wrote:
Has anyone ever heard of a code that would function as an undo button?
My
spreadsheet requires staff to make many entries throughout the day.
Sometimes they get distracted with phone calls and lose their spot. I
would
like to add an 'undo' button that would 'undo' their last 1 or 2 entries.
I
thought of just closing without saving, but then they would lose all
their
other entries, as well.

Any suggestions?

TIA...
Mark


Maybe I'm naive, but what's wrong with the Undo button?



dominicb[_176_]

Undo button??
 

Good evening dave_gb

The undo button doesn't work to undo a macro - you have to code your
own routine, but you can link it into the undo button, so a user
wouldn't normally notice the difference. This is what the OP was
after.

Bruise

John Walkenbach discusses this with a simple example he

http://www.j-walk.com/ss/excel/tips/tip23.htm

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=502683


davegb

Undo button??
 

RB Smissaert wrote:
You can't trace back very far with that.


If I remember right, it depends on how much memory you're got. At work,
I've got 1G, so I can go back a long way.


RBS

"davegb" wrote in message
ups.com...

Bruise wrote:
Has anyone ever heard of a code that would function as an undo button?
My
spreadsheet requires staff to make many entries throughout the day.
Sometimes they get distracted with phone calls and lose their spot. I
would
like to add an 'undo' button that would 'undo' their last 1 or 2 entries.
I
thought of just closing without saving, but then they would lose all
their
other entries, as well.

Any suggestions?

TIA...
Mark


Maybe I'm naive, but what's wrong with the Undo button?



davegb

Undo button??
 

dominicb wrote:
Good evening dave_gb

The undo button doesn't work to undo a macro - you have to code your
own routine, but you can link it into the undo button, so a user
wouldn't normally notice the difference. This is what the OP was
after.


I congratulate you! You're psychic!
Clearly, I'm not. :)


Bruise

John Walkenbach discusses this with a simple example he

http://www.j-walk.com/ss/excel/tips/tip23.htm

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=502683



RB Smissaert

Undo button??
 
Not sure it depends on available memory.
I got 1G as well, but I can only do 16 undo's.

RBS

"davegb" wrote in message
oups.com...

RB Smissaert wrote:
You can't trace back very far with that.


If I remember right, it depends on how much memory you're got. At work,
I've got 1G, so I can go back a long way.


RBS

"davegb" wrote in message
ups.com...

Bruise wrote:
Has anyone ever heard of a code that would function as an undo button?
My
spreadsheet requires staff to make many entries throughout the day.
Sometimes they get distracted with phone calls and lose their spot. I
would
like to add an 'undo' button that would 'undo' their last 1 or 2
entries.
I
thought of just closing without saving, but then they would lose all
their
other entries, as well.

Any suggestions?

TIA...
Mark

Maybe I'm naive, but what's wrong with the Undo button?




Dave Peterson

Undo button??
 

You can change the level of undo's in Excel:

xl2k and above
XL: How to Modify the Number of Undo Levels
http://support.microsoft.com/?kbid=211922

xl97
XL97: How to Modify the Number of Undo Levels
http://support.microsoft.com/?kbid=162944

RB Smissaert wrote:

Not sure it depends on available memory.
I got 1G as well, but I can only do 16 undo's.

RBS

"davegb" wrote in message
oups.com...

RB Smissaert wrote:
You can't trace back very far with that.


If I remember right, it depends on how much memory you're got. At work,
I've got 1G, so I can go back a long way.


RBS

"davegb" wrote in message
ups.com...

Bruise wrote:
Has anyone ever heard of a code that would function as an undo button?
My
spreadsheet requires staff to make many entries throughout the day.
Sometimes they get distracted with phone calls and lose their spot. I
would
like to add an 'undo' button that would 'undo' their last 1 or 2
entries.
I
thought of just closing without saving, but then they would lose all
their
other entries, as well.

Any suggestions?

TIA...
Mark

Maybe I'm naive, but what's wrong with the Undo button?



--

Dave Peterson

RB Smissaert

Undo button??
 
Thanks; never knew that.
Will stick with 16.

RBS

"Dave Peterson" wrote in message
...

You can change the level of undo's in Excel:

xl2k and above
XL: How to Modify the Number of Undo Levels
http://support.microsoft.com/?kbid=211922

xl97
XL97: How to Modify the Number of Undo Levels
http://support.microsoft.com/?kbid=162944

RB Smissaert wrote:

Not sure it depends on available memory.
I got 1G as well, but I can only do 16 undo's.

RBS

"davegb" wrote in message
oups.com...

RB Smissaert wrote:
You can't trace back very far with that.

If I remember right, it depends on how much memory you're got. At work,
I've got 1G, so I can go back a long way.


RBS

"davegb" wrote in message
ups.com...

Bruise wrote:
Has anyone ever heard of a code that would function as an undo
button?
My
spreadsheet requires staff to make many entries throughout the day.
Sometimes they get distracted with phone calls and lose their spot.
I
would
like to add an 'undo' button that would 'undo' their last 1 or 2
entries.
I
thought of just closing without saving, but then they would lose
all
their
other entries, as well.

Any suggestions?

TIA...
Mark

Maybe I'm naive, but what's wrong with the Undo button?



--

Dave Peterson




All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com