Paul,
I'm a complete novice at this. 1) I'm assuming ThisWorkBook you are
refering too is the one under my file name 2) What are the dropdowns you are
refering too? The properties? They are greyed out. 3) Instead of putting my
code in a module, put them in the This workbook? If I do that, then it errors
out on the 2nd line of my code (Invalid inside procedure). Or do I put some
other code w/in the Private Sub Workbook_Open
End Sub
This is my code to create the toolbar as part of the add-ins custom toolbar
group minus my macros. I copied it and the macros with in the Private Sub
Workbook_Open:
Option Explicit
Public Const ToolBarName As String = "HLBTR" <---- this is were it errors
Sub Aut
![Er... what? o_O o_O](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
pen()
Call CreateMenubar
End Sub
Sub Auto_Close()
Call RemoveMenubar
End Sub
Sub RemoveMenubar()
On Error Resume Next
Application.CommandBars(ToolBarName).Delete
On Error GoTo 0
End Sub
Sub CreateMenubar()
Dim iCtr As Long
Dim MacNames As Variant
Dim CapNames As Variant
Dim TipText As Variant
Dim PictNames As Variant
Dim PictWks As Worksheet
Call RemoveMenubar
MacNames = Array("GL", _
"TB", _
"IM", _
"PermFile", _
"PriorYear", _
"PBC", _
"WorkPaper", _
"Recalculated", _
"Fullfoot", _
"Crossfoot", _
"Footed", _
"Source", _
"ZeroSlash", _
"XMark", _
"Checkmark", _
"Undefined")
CapNames = Array("GL", _
"TB", _
"IM", _
"PermFile", _
"PriorYear", _
"PBC", _
"WorkPaper", _
"Recalculated", _
"Fullfoot", _
"Crossfoot", _
"Footed", _
"Source", _
"ZeroSlash", _
"XMark", _
"Checkmark", _
"Undefined")
TipText = Array("Traced to general ledger", _
"Traced to trial balance", _
"Immaterial", _
"Permanent File", _
"Prior Year", _
"Provided by client", _
"Work Paper Reference", _
"Recalculated", _
"Spreadsheet Footed", _
"Cross Footed", _
"Footed", _
"Traced to source document", _
"Zero Slash", _
"X Mark", _
"Check Mark", _
"Undefined")
PictNames = Array("GL", _
"TB", _
"IM", _
"PermFile", _
"PriorYear", _
"PBC", _
"WorkPaper", _
"Recalculated", _
"Fullfoot", _
"Crossfoot", _
"Footed", _
"Source", _
"ZeroSlash", _
"XMark", _
"Checkmark", _
"Undefined")
Set PictWks = ThisWorkbook.Worksheets("Pictures")
With Application.CommandBars.Add
..Name = "HLBTR"
..Left = 200
..Top = 200
..Protection = msoBarNoProtection
..Visible = True
..Position = msoBarFloating
For iCtr = LBound(MacNames) To UBound(MacNames)
PictWks.Pictures(PictNames(iCtr)).Copy
With .Controls.Add(Type:=msoControlButton)
..OnAction = "'" & ThisWorkbook.Name & "'!" & MacNames(iCtr)
..Caption = CapNames(iCtr)
..Style = msoButtonIcon
..PasteFace
..TooltipText = TipText(iCtr)
End With
Next iCtr
End With
End Sub