D
Dennis
I need help, please!
I have a add-in named "IDini.xla" with a "CreateIDNavigator" macro wich make
a custom command bar. The file "IDini.xla" have a worksheet named "Icons"
with some drawing objects where using the commnad "copy" and after
"PasteFace" in command bar.
I did the following:
Sub CreateIDNavigator()
Dim myControl1
For Each bar In Application.CommandBars
If Not bar.BuiltIn And bar.Name = "IDNavigator" Then bar.Delete
Next
Set myBar1 = CommandBars.Add(Name:="IDNavigator", _
Position:=msoBarFloating)
myBar1.Visible = False
Set myControl1 = myBar1.Controls.Add(Type:=msoControlButton, ID:=1)
With myControl1
.Style = msoButtonIcon
.Caption = "Registrar"
.OnAction = "AppRegister"
.Tag = "Register"
End With
Workbooks("IDini.xla").Worksheets("Icons").DrawingObjects(33).Copy
myControl1.PasteFace
myBar1.Visible = True
End Sub
I have a add-in named "IDini.xla" with a "CreateIDNavigator" macro wich make
a custom command bar. The file "IDini.xla" have a worksheet named "Icons"
with some drawing objects where using the commnad "copy" and after
"PasteFace" in command bar.
I did the following:
Sub CreateIDNavigator()
Dim myControl1
For Each bar In Application.CommandBars
If Not bar.BuiltIn And bar.Name = "IDNavigator" Then bar.Delete
Next
Set myBar1 = CommandBars.Add(Name:="IDNavigator", _
Position:=msoBarFloating)
myBar1.Visible = False
Set myControl1 = myBar1.Controls.Add(Type:=msoControlButton, ID:=1)
With myControl1
.Style = msoButtonIcon
.Caption = "Registrar"
.OnAction = "AppRegister"
.Tag = "Register"
End With
Workbooks("IDini.xla").Worksheets("Icons").DrawingObjects(33).Copy
myControl1.PasteFace
myBar1.Visible = True
End Sub