-
calling a sub
hello:
i have a sub:
Private Sub CmdTrack0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdTrack0.Click
TrackNum = 0
CmdTrack0.ImageIndex = 3
End Sub
all i want is to call the sub from another place,
if it was VB6, I'd write:
CmdTrack0_click()
but it doesn't work with vb.net!
please help me....
-
Put the code in a different sub, and call it from your buttons click event, and from wherever you want.
Although I used to call an eventhandler once in a while myselve, I don't see it as good coding practice. Well, maybe .NET will force us to get rid of these habbits.
-
I guess so...
-
In your call statement CmdTrack0_click() , there aren't any parameters.
You could try CmdTrack0_click(Nothing, Nothing) or whatever you decide the parameters should be.
:)
-
nothing hhhaaa?
i tried null, void, zero, 0, -1 and a few others
but i didn't try NOTHING!
:)