PDA

View Full Version : Sleeper: Ctr + Z after running macro



excelliot
07-08-2005, 02:49 AM
Is it posiible to undo action of any macro

i have seen that if any vba code is run then one can not undo if it is by mistake
any help to undo action of macro.:bug:

Bob Phillips
07-08-2005, 03:04 AM
Is it posiible to undo action of any macro

i have seen that if any vba code is run then one can not undo if it is by mistake any help to undo action of macro.

Unfortunately, many macro commands clear the undo stack, so it is lost.

If you need this sort of functionality in your code, you have to do it yourself, know what could chan ge, save the 'before' changes, etc.

John Walkenbach covers it at http://www.j-walk.com/ss/excel/tips/tip23.htm

excelliot
07-08-2005, 03:18 AM
Unfortunately, many macro commands clear the undo stack, so it is lost.

If you need this sort of functionality in your code, you have to do it yourself, know what could chan ge, save the 'before' changes, etc.

John Walkenbach covers it at http://www.j-walk.com/ss/excel/tips/tip23.htm

I copied & run macro but it gave follo error

Compile error
Can not define a public user defined type within an object module

i m running on windows 98, office 98

any help on it:help

Justinlabenne
07-08-2005, 04:11 AM
It needs to go in a Standard Module. :thumb

By the way, is Office 98 Excel 97 or Excel 2000? I have never heard of Office 98 or Excel 98, see here. Versions (http://www.j-walk.com/ss/excel/index.htm)

sheeeng
07-08-2005, 04:37 AM
It needs to go in a Standard Module. :thumb

By the way, is Office 98 Excel 97 or Excel 2000? I have never heard of Office 98 or Excel 98, see here. Versions (http://www.j-walk.com/ss/excel/index.htm)

I think office 98 is what he meant on is office 97.
...small mistake...
no big problem here....:friends:

excelliot
07-08-2005, 05:40 AM
I think office 98 is what he meant on is office 97.
...small mistake...
no big problem here....:friends:
Atlest somebody has same wavelenghth of mine:friends:

Zack Barresse
07-08-2005, 08:41 AM
That's good to know, I believe Excel 98 is Mac (yes, there is an Excel 98).

Justinlabenne
07-08-2005, 10:39 AM
Uh, I am on the wavelength, but since you said 98, it threw me, you could get an error becuase the code may not work in Excel 97, you (as Zack pointed out) could be using a mac and actually have Excel 98, or you could have made a mistake and put 98 instead of 97, been using windows 98 with office 2000, and put 98 for both, I just don't know.

I was curious as to where your problem with the code came from, and was trying to find out if it was version incompatability, code was in the wrong module, or something else.

So, hopefully you got the code to run no matter which version of Excel you have or if it's on a pc or a mac.