View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Obtain value of a control on a shortcut menu

From Rob Bovey:

Sub HandleCombo()

Dim ctlComboBox As CommandBarComboBox
Dim szItem As String

Set ctlComboBox = CommandBars.ActionControl

szItem = ctlComboBox.Text

''' This is required to overcome a screen refresh bug in Excel 97.
Application.ScreenUpdating = False
Application.ScreenUpdating = True

MsgBox "You chose " & szItem

End Sub

--
Regards,
Tom Ogilvy

"quartz" wrote in message
...
Could someone please show example code on how to capture what the selected
content (a string) of a combobox was on a shortcut menu when it closed?

Thanks in advance.