Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am getting a error with the following line (full sub is below):
Set cb = c.Controls.Add(msoControlButton, 5) setting this (msoControlButton, 5) to (msoControlButton, 1) does not result in an error message, but the button does not seem to execute the on action event Any help is much appreciated. Running Excel 2007 Sub Auto_Open() Dim c As CommandBar Dim cb As CommandBarButton Set c = Application.CommandBars.Add("Dashboard Controls", _ msoBarFloating, False, True) c.Enabled = True c.Visible = True Set cb = c.Controls.Add(msoControlButton, 2) cb.Style = msoButtonIconAndCaption cb.Caption = "Refresh Data" cb.FaceId = 159 cb.OnAction = "InitializeDataInput2" Set cb = c.Controls.Add(msoControlButton, 3) cb.Style = msoButtonIconAndCaption cb.Caption = "Generate Reports" cb.FaceId = 433 cb.OnAction = "ProcessReportSet01" Set cb = c.Controls.Add(msoControlButton, 4) cb.Style = msoButtonIconAndCaption cb.Caption = "Print Reports" cb.FaceId = 4 cb.OnAction = "PrintSet01" Set cb = c.Controls.Add(msoControlButton, 5) cb.Style = msoButtonIconAndCaption cb.Caption = "eMail Reports" cb.FaceId = 258 cb.OnAction = "CreateAndEmailReports" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with Nothing command | Excel Programming | |||
Problem with command button name | Excel Discussion (Misc queries) | |||
Macro command problem | Excel Discussion (Misc queries) | |||
command bar problem | Excel Programming | |||
command bar problem | Excel Programming |