-
Solved: Dynamic Range
I want to define a dynamic range. The following code gives the message:
Run-time error '438':
Object doesn't support this property or method
Any help would be appreciated! Thanks
[IMG]file:///C:/DOCUME%7E1/rgfinch/LOCALS%7E1/Temp/moz-screenshot.jpg[/IMG][IMG]file:///C:/DOCUME%7E1/rgfinch/LOCALS%7E1/Temp/moz-screenshot-1.jpg[/IMG]
[IMG]file:///C:/DOCUME%7E1/rgfinch/LOCALS%7E1/Temp/moz-screenshot-2.jpg[/IMG]Sub highlight090208()
colkount = Application.CountA(Range("1:1"))
MsgBox (colkount)
rowkount = Application.CountA(Range("A:A"))
MsgBox (rowkount)
mydata = Application.Offset("A1", 0, 0, rowkount, colkount)
Range("mydata").Select
End Sub
-
Try
Set myData = Range("A1").Resize(rowkount,colkount)
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules