Using Private Sub
Hi
I'm trying to use a Private sub in my macro, but nothing is going on.
The Macro's code:
Worksheet_SelectionChange (ActiveCell.CurrentRegion)
activesheet.Rows(3).Hidden = True
activesheet.Rows(4).Hidden = True
activesheet.Rows(5).Hidden = True
For i = 3 To 5
If activesheet.Rows(i).Hidden = True Then
MsgBox (activesheet.Cells(i, 1))
activesheet.Rows(i).Hidden = False
End If
Next
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveWindow
.ScrollRow = Target.Value
End With
End Sub
I would like to use my private sub in my sub. If anyone knows how I can do this, please send me an answer with, if possible, an example.
Tks very much.
Cutovoi
|