Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got a worksheet_selection change event and under certain circumstances,
I'd like to call another procedure. I need to pass the TARGET range to that other procedure. How do I do this? I've tried a couple of things that don't seem to work. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Test1()
Dim rng As Range Set rng = Range(Cells(1), Cells(5, 5)) Test2 rng End Sub Sub Test2(rng As Range) MsgBox rng.Cells.Count End Sub RBS "Barb Reinhardt" wrote in message ... I've got a worksheet_selection change event and under certain circumstances, I'd like to call another procedure. I need to pass the TARGET range to that other procedure. How do I do this? I've tried a couple of things that don't seem to work. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And it works just the same in worksheet event:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Test2 Target End Sub RBS "Barb Reinhardt" wrote in message ... I've got a worksheet_selection change event and under certain circumstances, I'd like to call another procedure. I need to pass the TARGET range to that other procedure. How do I do this? I've tried a couple of things that don't seem to work. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing a range to a function | Excel Programming | |||
Passing a Range | Excel Programming | |||
Passing a range into a VBA function | Excel Programming | |||
passing range to c# | Excel Programming | |||
Passing range to subprocedure - maybe? | Excel Programming |