E
Eager2Learn
I am working on creating a commandbar and buttons upon the workshee
opening, and then delete it when the worksheet closes. I am new a
this, and running into a problem.
Here is my code so far, it doesn't work. In the Workbook_Open I put
Call to this:
Private Sub CreateCommandBar()
Dim TBar As CommandBar
Set TBar = CommandBars.Add
With TBar
.Name = "OPLToolBar"
.Top = 0
.Left = 0
.Visible = True
End With
Set NewBtn1 = CommandBars("OPLToolBar").Controls.Add _
(Type:=msoControlButton)
With NewBtn1
.FaceId = 481
.OnAction = "Sort"
.Caption = "Main Sort"
.Style = msoButtonIconAndCaption
End With
End Sub
Thanks in advance for the help.
Jonatha
opening, and then delete it when the worksheet closes. I am new a
this, and running into a problem.
Here is my code so far, it doesn't work. In the Workbook_Open I put
Call to this:
Private Sub CreateCommandBar()
Dim TBar As CommandBar
Set TBar = CommandBars.Add
With TBar
.Name = "OPLToolBar"
.Top = 0
.Left = 0
.Visible = True
End With
Set NewBtn1 = CommandBars("OPLToolBar").Controls.Add _
(Type:=msoControlButton)
With NewBtn1
.FaceId = 481
.OnAction = "Sort"
.Caption = "Main Sort"
.Style = msoButtonIconAndCaption
End With
End Sub
Thanks in advance for the help.
Jonatha