Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting A Range
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting A Range
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" schreef in bericht ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
VBA setting Range | Excel Discussion (Misc queries) | |||
setting range().hidden=True causes range error 1004 | Excel Programming | |||
Setting a range when value is given | Excel Programming | |||
Setting a range using VBA | Excel Programming |