Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
command bar name not recognized
I've cobbled together the following code to create a toolbar everytime a
certain spreadsheet opens: Sub CreateOSIMenubar() Dim vMacNames As Variant Dim vCapNames As Variant Dim vTipText As Variant Call RemoveOSIMenubar vMacNames = "OSILogInsertRow" vCapNames = "OSILogInsertRow" vTipText = "Add Row" With Application.CommandBars .Add .Name = vMacNames <----- Compile Error: Method or Data Member not found .Left = 200 .Top = 200 .Protection = msoBarNoProtection .Visible = True .Position = msoBarTop .Left = CommandBars("FormatDGB").Left + CommandBars("FormatDGB").Width .RowIndex = CommandBars("FormatDGB").RowIndex End With With CommandBars(vMacNames).Controls.Add(Type:=msoContr olButton) .OnAction = "'" & ThisWorkbook.Name & "'!" & vMacNames .Caption = vCapNames .Style = msoButtonCaption .TooltipText = vTipText End With End Sub Doesn't recognize the name variable or something. Any ideas? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UDF Not recognized | Excel Worksheet Functions | |||
Excel not recognized using "open with" command on text files | Excel Discussion (Misc queries) | |||
One cell isn't recognized? | Excel Discussion (Misc queries) | |||
Add-In not Recognized | Excel Programming | |||
Command not recognized | Excel Worksheet Functions |