rfgraham
asked on
Calling a Private Sub from another Private Sub
I need to call a Private Sub called Save_Click from another Private Sub called New_Click. I can call a Private Sub I create but when I try and call one from a Private Sub generated from a Button it doesn't work. How would I code this?
getting any error ? please provide the code
ASKER
I am trying to call the sub using this: Save_Click()
and I'm getting this error - "Argument not specified for parameter of 'e' of 'Private Sub Save_Click(send As Object, e As System.EventArgs)"
and I'm getting this error - "Argument not specified for parameter of 'e' of 'Private Sub Save_Click(send As Object, e As System.EventArgs)"
are the two subs in the same class/module? if they are in two different classes you cannot call as their scope is private. have to change them to public scope.
please post existing code and the error message
please post existing code and the error message
if you are trying to call "Private Sub Save_Click(send As Object, e As System.EventArgs)"
you need to pass the parameters sender and e too.
you need to pass the parameters sender and e too.
call...
Save_Click(nothing,nothing )
Save_Click(nothing,nothing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.