cdoverlaw Posted January 24, 2004 Posted January 24, 2004 Hi, i want to execute my subroutine for when a button is clicked on one form when a button on my contextmenu is clicked. I have tried this code but it fails to work Private Sub mnuDefaultCpanel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuDefaultCpanel.Click frmCP.cmdLaunch_Click() End Sub Thanks for any help you can give Jonathan Quote
cdoverlaw Posted January 24, 2004 Author Posted January 24, 2004 I worked a way arround this which works out to be more efficient jonathan Quote
Administrators PlausiblyDamp Posted January 24, 2004 Administrators Posted January 24, 2004 What is the name of the form this sub is in? If it is frmCP then you could do either Private Sub mnuDefaultCpanel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuDefaultCpanel.Click cmdLaunch_Click() End Sub or Private Sub mnuDefaultCpanel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuDefaultCpanel.Click Me.cmdLaunch_Click() End Sub Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
cdoverlaw Posted January 24, 2004 Author Posted January 24, 2004 its not being excecuted on frmCP anyway i have just made it so that its a subroutine on that form which is then executed by the button subroutine and the other forms subroutine Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.