Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,059
Default How to undo ClearContents?

Currently, I do Range(...).ClearContents. Apparently, that cannot be
undone by ctrl-Z in Excel.

Is there any way to accomplish the same thing (in VB) so that it can
be undone by ctrl-Z in Excel?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How to undo ClearContents?

Nope

"joeu2004" wrote:

Currently, I do Range(...).ClearContents. Apparently, that cannot be
undone by ctrl-Z in Excel.

Is there any way to accomplish the same thing (in VB) so that it can
be undone by ctrl-Z in Excel?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default How to undo ClearContents?

hi
unfortunately running macros bypasses all of the built in niceities of
excel. once you have run a macro, there is little chance of going back.
see this site....
http://j-walk.com/ss/excel/tips/tip23.htm
undo a vba sub routine.
caution: when i click on my link, i got a not found message. but i went to
http://j-walk.comspreadsheetpagedeveloperstips....
down towards the bottom.
code to undo.
p.s. not easy. good luck.

regards
FSt1


"joeu2004" wrote:

Currently, I do Range(...).ClearContents. Apparently, that cannot be
undone by ctrl-Z in Excel.

Is there any way to accomplish the same thing (in VB) so that it can
be undone by ctrl-Z in Excel?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,059
Default How to undo ClearContents?

On Feb 1, 6:16*pm, FSt1 wrote:
"joeu2004" wrote:
Currently, I do Range(...).ClearContents. Apparently, that
cannot be undone by ctrl-Z in Excel.
Is there any way to accomplish the same thing (in VB) so
that it can be undone by ctrl-Z in Excel?


unfortunately running macros bypasses all of the built in niceities
of excel. once you have run a macro, there is little chance of
going back.


Thanks. Not surprised. Just thought I'd ask.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default How to undo ClearContents?

On Feb 1, 11:29 pm, joeu2004 wrote:
On Feb 1, 6:16 pm, FSt1 wrote:

"joeu2004" wrote:
Currently, I do Range(...).ClearContents. Apparently, that
cannot be undone by ctrl-Z in Excel.
Is there any way to accomplish the same thing (in VB) so
that it can be undone by ctrl-Z in Excel?


unfortunately running macros bypasses all of the built in niceities
of excel. once you have run a macro, there is little chance of
going back.


Thanks. Not surprised. Just thought I'd ask.


There are PutInClipboard and GetFromClipboard methods in VBA. I have
not used them. But I imagine you could write a MyClearContents sub in
which the current selection is put into the clipboard and then the
range is cleared. You can read up on the method's VBA documentation
to figure out if it would work in your case.

SteveM


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
ClearContents Paul Dennis Excel Programming 2 September 11th 07 02:58 PM
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
Clearcontents Caroline Vincent Excel Programming 2 September 9th 04 11:03 AM
Clearcontents K Dales Excel Programming 0 February 27th 04 01:52 PM
Clearcontents Dick Kusleika[_3_] Excel Programming 0 February 17th 04 05:42 PM


All times are GMT +1. The time now is 02:15 PM.

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"