misi01
New member
To the moderator - please change title if you think it's misleading or can be improved. To my problem.
I have existing code (written for Office 2003) that creates a customized menu with the following (approx) options.
I have created this using the following code
Is this possible with ribbon coding (we are using Office 2007), and if so, can anyone point me to an example of how to do this ?
I have existing code (written for Office 2003) that creates a customized menu with the following (approx) options.
Code:
Update data
Clear data
------------
Change language ---> Swedish (the ---> represents a popup)
Norwegian
etc etc
------------
Version
I have created this using the following code
Code:
' Add another menu that will lead off to another menu (popup)
Set MenuItem = MenuObject.Controls.Add(Type:=msoControlPopup)
MenuItem.Caption = menu_texts(3) ' Change language
MenuItem.BeginGroup = True ' Insert a separator ABOVE this option
' Add the menu options to the sub menu, just created above
'
' Make sure we point at the English flag on the technical sheet
'
Set sh = Sheets(technical_sheet_name) 'Change here to the worksheet for shapes
Set shp = sh.Shapes("English") ' Select the English flag
shp.CopyPicture Format:=xlBitmap
With MenuItem.Controls.Add(Type:=msoControlButton)
.Caption = menu_texts(4) ' English
.OnAction = "change_language_english"
.Tag = "ENGLISH"
.PasteFace
End With
'
' Make sure we point at the Swedish flag on the technical sheet
'
Set shp = sh.Shapes("Swedish") ' Select the Swedish flag
shp.CopyPicture Format:=xlBitmap
With MenuItem.Controls.Add(Type:=msoControlButton)
.Caption = menu_texts(5) ' Svenska
.OnAction = "change_language_swedish"
.Tag = "SWEDISH"
.PasteFace
End With
etc etc
Is this possible with ribbon coding (we are using Office 2007), and if so, can anyone point me to an example of how to do this ?
Last edited: