Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the reply
Actually, it is not very convenient to copy paste somewhere in the workbook. The issue is that I have a new workbook event procedure which ultimately clears the cliboard every time I open a new workbook. Hence, what I would like to have is sth like: In my event procedure it should check whether application.cutcopymode=True and in which case it should assign the copied range to a variable e.g. rngCopied. Then, after the event procedure has finished, it should re-copy the rngCopied range. Is that possible? Thx "Gary''s Student" wrote: Just dim some range variables and assign them: Sub demo() Dim CopiedRangeSource As Range Dim CopiedRangeDestination As Range Set CopiedRangeSource = Range("A1:A100") Set CopiedRangeDestination = Range("Z100") CopiedRangeSource.Copy CopiedRangeDestination End Sub -- Gary''s Student - gsnu200840 "johnmasvou" wrote: Hi, I would like to assign a copied range to a variable. Note: Sth like Set rngCopied=Selection will not always work because my selected range and copied range might be different. Thx |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Excel how to assign name in variable range | Excel Programming | |||
range variable won't assign (chartobject.topleftcell property) | Excel Programming | |||
How to assign a variable in a range select | Excel Programming | |||
How can I assign a range starting cell based on a variable locati. | Excel Discussion (Misc queries) | |||
How can I assign a range starting cell based on a variable locati. | Excel Worksheet Functions |