Save Copy or Cut Reference

  • Thread starter Thread starter Matthew Pfluger
  • Start date Start date
M

Matthew Pfluger

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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top