Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default CommandBarControl, Exists???

Hi All!

Does anyone knows how to check if a given
commandbarcontrol exists and maybe analyze it with a
boolean var???

I want to check for CommandBars(1).Controls
("Tools").Controls("My Personal Tools")

If it exists use it and add a control inside, if not,
creat it....then add a control...

Any help is greatly appreciated...

Regards
Juan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default CommandBarControl, Exists???

Hi
try something like the following

Dim ctrl
on error resume next
set ctrl = CommandBars(1).Controls("Tools").Controls("My Personal
Tools")
on error goto 0
if ctrl is nothing then
msgbox "Control does not exist"
end if


--
Regards
Frank Kabel
Frankfurt, Germany

"Juan" schrieb im Newsbeitrag
...
Hi All!

Does anyone knows how to check if a given
commandbarcontrol exists and maybe analyze it with a
boolean var???

I want to check for CommandBars(1).Controls
("Tools").Controls("My Personal Tools")

If it exists use it and add a control inside, if not,
creat it....then add a control...

Any help is greatly appreciated...

Regards
Juan


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
CommandBarControl object Fred Davis Excel Discussion (Misc queries) 14 March 5th 08 02:26 PM
A value exists in a list? Alberto Pinto Excel Discussion (Misc queries) 1 May 16th 06 10:43 PM
File Exists Mike McLellan Excel Discussion (Misc queries) 2 May 4th 06 09:20 AM
Worksheet Exists... James Weaver Excel Programming 3 October 6th 03 02:56 PM
CommandBarControl class John A Grandy Excel Programming 2 July 19th 03 07:42 PM


All times are GMT +1. The time now is 04:06 AM.

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

About Us

"It's about Microsoft Excel"