PDA

Click to See Complete Forum and Search --> : Context Menus


markwestcott
Jan 2nd, 2000, 04:57 PM
Is it possible that I can have a menu that I can change captions from executing time? Ie, when someone clicks on one item, the menu relates to that without having to have tons of different menus?

Thanks

Frankiz
Jan 2nd, 2000, 09:36 PM
You must reference your Project to the MS Office 8.0 Object Library then you can use this objects to add or remove menus to your command bar.
E.g:


Dim newCmdButton as CommandBarButton

Set newCmdButton = CommandBars(2).Controls.Add(1, , , VBInstance.CommandBars(2).Controls.Count)

With newCmdButton
.Caption = "MyCaption"
End With



Regards,
Frank

Frankiz
Jan 2nd, 2000, 09:39 PM
Damn!!!
Why are there no linebreaks in the codesection! HELP!!!


Here is the first line

And where is the empty line??


sldfkj

Clunietp
Jan 3rd, 2000, 12:26 AM
First Line


Skip 2 lines

Skip 1 line

Clunietp
Jan 3rd, 2000, 12:27 AM
looks like you have to skip 2 lines instead of just 1.....

MartinLiss
Jan 3rd, 2000, 12:32 AM
I may not understand your original question, but you can change a manu's caption anytime in your code with someting like MyMenu.Caption = "this is a new caption"

------------------
Marty