I have tried to google this but returned nothing useful;

I have code which runs in a menu item (StartToolStripMenuItem_Click).
Later in the project i want to code clicking this menu item but if i just use the StartToolStripMenuItem_Click sub it wants the 'e' argument passed to it. I simply can not work out what i should be passing.....any ideas please.

Many Thanks
David

Member Avatar

This

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       
        StartToolStripMenuItem.PerformClick()
       
End Sub

Or This

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       
       StartToolStripMenuItem_Click(StartToolStripMenuItem, EventArgs.Empty)

End Sub

Thank you so much....exactly what i needed.