LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Correct Useage of .FindControls

Hey All,

Not able to find any helpful resources on MSDN or by search on this forum, I
am wondering if anyone can help me correctly use FindControls. I am creating
a number of commandBars, but right now, just trying to get one to work now.

I am trying to implement findControls, so that, before I create another
button, it doesn't already exist... Have to check this b/c if vb IDE is
opened while my workbook is opened, some strange things happen with
workbook_open().

Anyway, hopefully I am clear enough. Here is my code (commented line of code
that isn't valid).

Code:

Public myThing5 As Office.CommandBar Public temp As
Office.CommandBarControls Sub Workbook_BeforeClose(Cancel As Boolean)
myThing5.Delete End Sub Sub Workbook_Open() Set temp =
CommandBars.FindControls(, , "test") 'NOT VALID If TypeName(temp) = "Nothing"
Then Set myThing5 = Application.CommandBars.Add("test", msoBarPopup, , True)
End If UserForm1.Show vbModeless End Sub


Thanks!
 
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
Excel 2003 - open work book useage agreement mbotfield Excel Worksheet Functions 3 September 23rd 09 04:53 PM
FindControls ID Bogdan Excel Programming 1 April 27th 07 09:00 PM
CPU useage at 100% on EXCEL.EXE Dave Patrick Excel Discussion (Misc queries) 0 January 1st 07 03:01 AM
IF Statement useage BThrasher Excel Discussion (Misc queries) 4 May 18th 06 03:21 PM
MsgBox Useage Jeff[_24_] Excel Programming 2 November 7th 03 01:08 PM


All times are GMT +1. The time now is 07:52 AM.

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"