I'm REALLY stumped this time.
It seems like my UserForm_Initialize() sub can't see my variable from the general declarations in the procedure that loads the form.
Schedule worksheet:
formScore:
The first MsgBox dislplays the row number, but the second one is blank, obviously not seeing the 'global' variable...
I've looked all over to find out why. Everywhere they simply say declare it in the general section in the module that loads the form... anybody see the problem?
It seems like my UserForm_Initialize() sub can't see my variable from the general declarations in the procedure that loads the form.
Schedule worksheet:
Code:
Dim lngRow As Long
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
lngRow = Target.Range.Row
MsgBox lngRow
Load formScore
formScore.Show
Unload formScore
Worksheets("Schedule").Range("I1").Activate
End Sub
formScore:
Code:
Private Sub UserForm_Initialize()
MsgBox lngRow
End Sub
The first MsgBox dislplays the row number, but the second one is blank, obviously not seeing the 'global' variable...
I've looked all over to find out why. Everywhere they simply say declare it in the general section in the module that loads the form... anybody see the problem?