Correct Useage of .FindControls
thanks for the help, but still not quite working...
with this code:
Public myThing5 As Office.CommandBar
Public temp As Office.CommandBarControls
Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
myThing5.Delete
End Sub
Sub Workbook_Open()
On Error Resume Next
Application.CommandBars("test2").Delete
Set myThing5 = Application.CommandBars.Add("test2", msoBarPopup, , True)
UserForm1.Show vbModeless
End Sub
Still doesn't work quite right... Works perfect until IDE is opened. Then if
you go back to the form the button, with the following line of code:
ThisWorkbook.myThing5.ShowPopup
no longer works...
I can attach this very small demo book if you would like to see/test this
phenomenon.
|