|
-
Sep 30th, 2004, 10:41 PM
#1
Thread Starter
Lively Member
Resolved - calling button code by menu item click
I have a working button code.
I would like to call same by clicking menu list item.
how do I do it?
Last edited by santosh66; Oct 19th, 2004 at 10:46 PM.
-
Sep 30th, 2004, 10:52 PM
#2
VB Code:
Private Sub mnuFileNew_Click()
Command1_Click
End Sub

Edit Ha! Faster by three minutes!
Last edited by Merri; Sep 30th, 2004 at 10:57 PM.
-
Sep 30th, 2004, 10:55 PM
#3
Try this....
VB Code:
Private Sub YourMenu_Click()
'Call Working Button Code
'If the code is in the click event of a button try this
MyButton_Click
End Sub
-
Oct 1st, 2004, 12:33 AM
#4
Frenzied Member
You can also say....
Though I know of no one else who does it like that
-
Oct 1st, 2004, 01:13 AM
#5
I use the Value property to fire the click event.
-
Oct 1st, 2004, 02:06 AM
#6
But if you have code in any other events put them instead of Click, like:
VB Code:
Command1_KeyPress
Command1_MouseDown
etc...
-
Oct 1st, 2004, 02:26 AM
#7
Originally posted by brucevde
I use the Value property to fire the click event.
Ditto here. So Spajeoly you now know 2 people who do it that way.
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|