View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Todd Huttenstine[_3_] Todd Huttenstine[_3_] is offline
external usenet poster
 
Posts: 68
Default Testing to see if a Workbook menu item exists

ha yeah I am busy. THanx for your help.

Todd
"Harald Staff" wrote in message
...
Hi Todd

You seem to be busy these days :-)

Function GotMenu(strCapt As String) As Boolean
On Error Resume Next
GotMenu = Len(Application.CommandBars(1).Controls(strCapt).C aption)
End Function

Sub test()
MsgBox GotMenu("File")
MsgBox GotMenu("Import Data")
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Todd Huttenstine" skrev i melding
...
Hey guys

What is the code to test to see if the workbook menu item "Import Data"
exists? If it exists, it will be located to the right of the menu item
"Help".

Thanx

Todd Huttenstine