How can I bring a menu editor in VBA to creat toolbar as a form heading?I have a form for inputing data and I want to have File menu: new/save/Exit menus at the top of my form.
In VB I right click on the form and there is menu editor.
How can I bring a menu editor in VBA to creat toolbar as a form heading?I have a form for inputing data and I want to have File menu: new/save/Exit menus at the top of my form.
In VB I right click on the form and there is menu editor.
Hi Mary.....why do you keep posting your questions in the announcments forum?
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln
Hi Mary,
By posting in the Announcments forum, most of us will have no idea what program you are using. I'm just going to hazard a guess on this that because you are using a Form, that it is a Word question. I'm moving your question to our Word forum so that someone can help you out.
If that is incorrect, please let us know. In future, we'd also appreciate it if you could post your questions in the appropriate forum.
Thanks,
Ken Puls, CMA - Microsoft MVP (Excel)
I hate it when my computer does what I tell it to, and not what I want it to.
Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar
This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!
Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!
VBA doesn't work like VB, there is no menu editor. If you want one, you will have to build your form in VB, and then call from VBA.
Dear all,
sorry if I posted in a wrong place. My posts are related to VBA.
What program, Maryam? Word, Excel, Acces, Powerpoint, something else? We have forums devoted to each of them.
We could use a little more info on your issue before we can start to help you.
Ken Puls, CMA - Microsoft MVP (Excel)
I hate it when my computer does what I tell it to, and not what I want it to.
Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar
This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!
Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!
In any case, xld is correct, there IS no menu editor in VBA.
Actually, Ivan Moala has an API hack to do it http://www.xcelfiles.com/API_Userform_MenuMaker.html but I must admit it is too cumbersome and not stable enough for my liking. Using a VB menu is simpler if I must have menus.
Dear Ken Puls,
It is VBA in Excel.
Dear xld,
That procedure is too complicated. So in VBA in Excel we cannot put menu bar at the top of the userform as easily as VB? In VB6 I just used Menu Editer to creat menus and submenus.
I agree the procedure is complex, and it isn't robust enough in my experience.
So, in VBA you either use Ivan's API solution, you use a VB6 dll encapsulated menu, or you don't do it.
Here's a fudged emulator. Not saying it is good, but it is an option
Dear Xld,
Thank you, I will try it.
Regards,
Maryam
Dear xld,
This is perfect . Thank you very much.
xld, thanks, that is a nice addition to design options. I changed the commandbuttons to Labels and used Label_Click. I placed the labels right smack up along the top. Having text along the top makes it look more like a menu bar than using commandbuttons.
Pretty cool. Thanks. It of course does not respond as fast as REAL menu items, but it is fairly quick and does open up possibilities for redirecting code flow. And possibilities for greatly increasing the number of procedures cleanly available to the user from one userform.
I am a Word guy, rather than Excel, so I made them Word stuff. I also made the Label text dynamic as well. So under Tools, there is a Bookmarks item. Clicking the Bookmarks item changes the label text from:
File Edit Tools
to:
Add Delete Range Go To Export
With the "Go To" and "Export" labels (previously Visible = False) now set to Visible = True. Controls such as comboboxes etc. become visible depending on which array of labels is visible. And procedures are set up as popups depending on what array of labels are visible.
Like I said, pretty cool, and definitely gives more design options to userforms.
Good stuff.
fuemi,
Dont you post your file?
I agree, I would like to see it also, especially if it is Word
Sorry. Actually...no...I did not as it was just a modification to xld's stuff.
Give me a little bit. I am just back from three weeks away and I am kind of swamped.
Um, and...I didn't know I am supposed to post up everything I do for everyone.
I taught you like to share becasue you explained it. If you dont like then you don't.