Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default How to store Range for "home-made" Undo Function?

Hello -

I have restriced inserting and deleting rows on a Worksheet to make
users use functionality of a custom toolbar. That way I can make sure
that formatting stays consistent.

I am now trying to make an undo function after the deletion of a row.
Currently I store the .Value and other . entries in global variables
but it seems like there should be an esier way.

I tried to define a ...
Public mRange as Range
and then assign ...
Set mRange = lSheet.Range(...)
.... but when I try to access mRange from within another function, it
seems to have lost all the data.

How can I create a copy of the range and store it in a variable in
order to restore it later on?

Thanks,
Joe

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default How to store Range for "home-made" Undo Function?

Joe, what is often done, is use an extra hidden worksheet (xlHidden or
xlVeruHidden) where you store some data.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Joe HM" wrote:

Hello -

I have restriced inserting and deleting rows on a Worksheet to make
users use functionality of a custom toolbar. That way I can make sure
that formatting stays consistent.

I am now trying to make an undo function after the deletion of a row.
Currently I store the .Value and other . entries in global variables
but it seems like there should be an esier way.

I tried to define a ...
Public mRange as Range
and then assign ...
Set mRange = lSheet.Range(...)
.... but when I try to access mRange from within another function, it
seems to have lost all the data.

How can I create a copy of the range and store it in a variable in
order to restore it later on?

Thanks,
Joe


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default How to store Range for "home-made" Undo Function?

Hello -

That might work for me ... I need to check it out. It's just a little
weird that there seems to be no other way to do this ...

Thanks!
Joe


On Jul 14, 5:12 am, Wigi wrote:
Joe, what is often done, is use an extra hidden worksheet (xlHidden or
xlVeruHidden) where you store some data.

--
Wigihttp://www.wimgielis.be= Excel/VBA, soccer and music



"Joe HM" wrote:
Hello -


I have restriced inserting and deleting rows on a Worksheet to make
users use functionality of a custom toolbar. That way I can make sure
that formatting stays consistent.


I am now trying to make an undo function after the deletion of a row.
Currently I store the .Value and other . entries in global variables
but it seems like there should be an esier way.


I tried to define a ...
Public mRange as Range
and then assign ...
Set mRange = lSheet.Range(...)
.... but when I try to access mRange from within another function, it
seems to have lost all the data.


How can I create a copy of the range and store it in a variable in
order to restore it later on?


Thanks,
Joe- Hide quoted text -


- Show quoted text -



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
Undo "Convert to formulas" pivot function Tomas Excel Discussion (Misc queries) 1 March 26th 09 12:52 PM
VBA code store address with areas separated with "," and I need it sometimes with ";" instead tskogstrom Excel Programming 2 June 17th 07 04:14 AM
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" Luc[_3_] Excel Programming 2 September 28th 05 08:37 PM
changing a SendKeys "(^+{home})" to a function filo666 Excel Programming 6 April 12th 05 08:32 PM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


All times are GMT +1. The time now is 03:53 AM.

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"