If a UserControl contains a Sub such as
Public
Sub BackOne_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles BackOne.Clickand another UserControl calls the Sub above as per;
MainForm.ctlPostEdit.BackOne_Click() where it is defined on the MainForm as;
Public ctlPostEdit As PostEdit.PostEdit,why/how would I solve the following error
Argument not specified for parameter 'eventArgs' of 'Public Sub BackOne_Click(eventSender As Object, eventArgs As System.EventArgs)'
This worked just as is in the previous vb6 app.
Thank you,
-Greg

argument not specified for parameter 'eventArgs' - calling sub in another UserControl
ghostnguyen
Thank you Reed! the eventSender made sense but 'newing up eventargs wasn't obvious.
-greg
PerErik
You have to provide the arguements specified in the method signiture (in this case, a System.Object and a System.EventArgs).
This can be done using:
MainForm.ctlPostEdit.BackOne_Click(Me, New System.EventArgs)
But you can also just call
MainForm.ctlPostEdit.BackOne.PerformClick()