View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default dimensioning variables

Carla,
You didn't post your code, but is it like this ?
Dim r As Range
Set r = ActiveSheet.Range("D6:S1047 ")
MsgBox MsgBox r.Rows.Count & " x " & r.Columns.Count

NickHK

"Carla101" wrote in
message ...

One of my variables is the range D6:S1047 but an object mismatch occurs
when I dimension it as a range. The macro works fine with a smaller
range such as D6:S266. Does anybody know how to declare such a large
range as a variable?
Thanks.


--
Carla101
------------------------------------------------------------------------
Carla101's Profile:

http://www.excelforum.com/member.php...o&userid=30346
View this thread: http://www.excelforum.com/showthread...hreadid=500057