|
-
Nov 18th, 2000, 04:46 AM
#1
Thread Starter
Lively Member
Hi,
I have this code to create CommandBars in Excel.
I can give it .Caption = "VBEtest"
I can give it .OnAction= "VBE_test" --> this is a macro.
I can give it .ShortcutText= "F2" --> this comes after the caption.
But, how do I activate those function buttons in VBE ???
Code:
Sub CreateCustomMenuBars()
Dim vntEditArray As Variant
Dim vntHelpArray As Variant
Dim vntMenuVar As Variant
vntEditArray = Array(18, 17, 16, 15, 12, 11, 10, 9, 8)
vntHelpArray = Array(5, 4)
With Application.CommandBars("Worksheet Menu Bar")
.Reset
For Each vntMenuVar In vntEditArray
.Controls("Edit").Controls(vntMenuVar).delete
Next
.Controls("View").delete
.Controls("Insert").delete
.Controls("Format").delete
.Controls("Tools").delete
.Controls("Data").delete
.Controls("Window").delete
.Controls("File").delete
.Controls("Edit").delete
.Controls("help").delete
With .Controls.Add(msoControlPopup)
.Caption = "&DEY MODULE"
With .Controls
With .Add(msoControlButton)
.Caption = "&About DEY MODULE"
.OnAction = "about"
.ShortcutText = "F2" 'how do I activate the F2 button ??
End With
With .Add(msoControlButton)
.Caption = "&Reset Menus"
.OnAction = "RestoreEnvironment"
End With
With .Add(msoControlButton)
.Caption = "&Show"
.OnAction = "Show"
.ShortcutText = "F3"
End With
With .Add(msoControlButton)
.Caption = "&Quit"
.OnAction = "QuitApp"
End With
End With
End With
End With
End Sub
-
Nov 18th, 2000, 01:25 PM
#2
Addicted Member
I'm also interested in finding this out.
If anyone has an answer, I would like to hear about it too.
-
Nov 18th, 2000, 10:58 PM
#3
Thread Starter
Lively Member
please ...
Is there anybody out there ...
-
Nov 19th, 2000, 06:48 AM
#4
Registered User
Using Add-in
Create a new add-in project and take a look in his code, it should help you!
Jefferson
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
|