Philip Treacy
Admin
Forum Posts: 1614
Member Since:
October 5, 2010
October 5, 2010
Offline
Hi Ravikiran
Not quite sure what you mean but there are a few things you need to change
You've declared r as as range but you are using rng
You also need to Set a range variable
And are you trying to get the intersection of the range described by c and ActiveSheet.UsedRange?
Try this
Sub MyRanges()
Dim rng As Range, c As String
c = ActiveCell.EntireColumn.Address(False, False)
Set rng = Intersect(Range(c), ActiveSheet.UsedRange)
End Sub
Regards
Phil
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Riny van Eekelen
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1939
SunnyKow: 1432
Anders Sehlstedt: 929
Purfleet: 415
Hans Hallebeek: 352
Frans Visser: 349
David_Ng: 312
lea cohen: 248
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
Dhanushka Rathnayake
Rena Towles
Wim Verhaege
Shavirai Mawere
Macarena Verdugo
Linlin Reid
Francisco Barrera
Terry McAuliffe
Michel Richard
James Ramsey
Forum Stats:
Groups: 3
Forums: 25
Topics: 7093
Posts: 31095
Member Stats:
Guest Posters: 49
Members: 34522
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —