Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 - open work book useage agreement | Excel Worksheet Functions | |||
FindControls ID | Excel Programming | |||
CPU useage at 100% on EXCEL.EXE | Excel Discussion (Misc queries) | |||
IF Statement useage | Excel Discussion (Misc queries) | |||
MsgBox Useage | Excel Programming |