Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When a macro or an event is run, often CutCopyMode is set to FALSE (lost).
Has anyone put together any code that saves this information? I'd like to wrap my existing Worksheet_Activate event with something that saves or re-enables CutCopyMode with the previous reference so that users can bring data into a new form. Thanks, Matthew Pfluger |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
use a variable instead of copy(to the clipboard) 'note: string = text, long = nondecimal number, single or double = decimal number 'look up data types in vb help dim rng as string ' declare your variable Set rng = Range("A1").value 'set the value of the variable vb will hold the variable untill the sub ends then poof. gone. this avoids the clipboard all togeather. hope this helps Regards FSt1 "Matthew Pfluger" wrote: When a macro or an event is run, often CutCopyMode is set to FALSE (lost). Has anyone put together any code that saves this information? I'd like to wrap my existing Worksheet_Activate event with something that saves or re-enables CutCopyMode with the previous reference so that users can bring data into a new form. Thanks, Matthew Pfluger |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I must not have been specific enough. I'm talking about range or
other objects. For example, say I want to copy a column of cells to a worksheet that contains an _Activate event. It is likely that the reference to the copy range will be lost in that time. I was hoping that someone had something coded that I could call like this: private sub Worksheet_Activate call StoreCutCopyMode() '... code here call RestoreCutCopyMode() end sub If I come up with anything, I will be sure to share it here. Thanks, Matthew Pfluger "FSt1" wrote: hi use a variable instead of copy(to the clipboard) 'note: string = text, long = nondecimal number, single or double = decimal number 'look up data types in vb help dim rng as string ' declare your variable Set rng = Range("A1").value 'set the value of the variable vb will hold the variable untill the sub ends then poof. gone. this avoids the clipboard all togeather. hope this helps Regards FSt1 "Matthew Pfluger" wrote: When a macro or an event is run, often CutCopyMode is set to FALSE (lost). Has anyone put together any code that saves this information? I'd like to wrap my existing Worksheet_Activate event with something that saves or re-enables CutCopyMode with the previous reference so that users can bring data into a new form. Thanks, Matthew Pfluger |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Any Way to Save Eons of Typing? Automating 3D Reference to Sheet N | Excel Worksheet Functions | |||
How do I save Excel info without saving the reference cells? | Excel Discussion (Misc queries) | |||
Save WB from reference found in cell D1 to specific folder | Excel Programming | |||
Save column J only using copy/paste & temporary copy | Excel Programming | |||
How to save a file without overwrite or save a copy? | Setting up and Configuration of Excel |