Thread: Variable ranges
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Variable ranges

Must be something wrong with the values in Row and col. What do they contain
at that point.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"igorek" wrote in message
...
Hi,
As i write my code the range that i'm referring to changes. To identify

the
lower and the upper limits of the range i use the following

BeginRange = Worksheets("Content").Cells(5, col).Address
EndRange = Worksheets("Content").Cells(Row, col).Address

Now, as i select this range and try to copy it elsewhere i'm trying to use
the following expression:

Worksheets("Content").Range("" & BeginRange & " :" & EndRange & "").Select

Every time I get to this point i get an error '1004' - "Application

defined
or object defined error"

Can anyone please advise as to what is going on and how to get arround it?

Thanks a bunch
Igor