Just pass the range as an argument in your sub...
Public Sub RangeDemo(r As Range)
Dim e As Variant 'every element in range
For Each e In r
MsgBox r.Value
Next
End Sub
"Reggie" <[email protected]> schreef in bericht
news:[email protected]...
> Is is possible to to set a range in VB and have any sub use it? If so how
> would i be able to do this? Code so far
>
> Set plane = Worksheets("Sheet1").Range("A98")
>
> i want the range "plane" to be used throughout the worksheet.
Bookmarks