DanG
Registered User.
- Local time
- Today, 05:22
- Joined
- Nov 4, 2004
- Messages
- 477
Hello,
I'm just trying to get the concept (not on a project).
In the code below, the first function defines a range and calls it "myrange". I then want to use that range in another fuction (2nd one down) to select it. I might want to do other things with this range in other functions too, not sure what.
Any ideas?
I'm just trying to get the concept (not on a project).
In the code below, the first function defines a range and calls it "myrange". I then want to use that range in another fuction (2nd one down) to select it. I might want to do other things with this range in other functions too, not sure what.
Any ideas?
Code:
Sub MyDynRange()
ActiveSheet.Select
Dim Mycol As Range
Dim MyRow As Range
Dim myrange As Range
Set Mycol = Range("IV1").End(xlToLeft)
Set MyRow = Range("A65536").End(xlUp)
Set myrange = Range(Mycol, MyRow)
'myrange.Select
End Sub
Sub SelectMyRange()
Call MyDynRange
Dim ModRange As Range
Set ModRange = Range(myrange).Select
End Sub