View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Assign copied range to a variable

I am not sure I follow your logic. As you write your code, you should know
what you intend to copy, so it is easy enough to set it to an object variable
at the time you determine you want to copy. If you have a variable range,
then use the last row and/or last column techniques to get the current size
of the range. Or you can use the resize method in some cases. There are
several options.



"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