Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Testing to see if a Workbook menu item exists

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Testing to see if a Workbook menu item exists

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




  #3   Report Post  
Posted to microsoft.public.excel.programming
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
keep new menu item with workbook Andy G. Excel Discussion (Misc queries) 1 May 16th 06 08:09 PM
Match return #NA ...though item exists! Sige Excel Discussion (Misc queries) 2 January 12th 06 02:49 PM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
determinate if pop up menu exists GUS Excel Programming 1 November 4th 03 08:11 PM
Testing to see if a sheet name exists anita Excel Programming 1 September 4th 03 10:14 PM


All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"