F
FredGill
Hi,
I've created an addin that puts a button on the "standard" toolbar (see
code below) using the clipboard - as this is the only way I could get it
working. The side-effect of this is that the clipboard is cleared - is
there a better way of getting my resource bitmap as the button image?
regards
Fred
Clipboard.Clear
Clipboard.SetData LoadResPicture(IIf(ToggleEnabled, 101, 102),
vbResBitmap) 'depends on enabled or not!!!!
'Attach our button to the Standard menu bar
Set ToggleBtn =
objInsp.CommandBars("Standard").Controls.Add(Type:=msoControlButton,
Temporary:=True)
With ToggleBtn
.Style = msoButtonIcon
.PasteFace
.Enabled = True
.ToolTipText = LoadResString(150)
End With
I've created an addin that puts a button on the "standard" toolbar (see
code below) using the clipboard - as this is the only way I could get it
working. The side-effect of this is that the clipboard is cleared - is
there a better way of getting my resource bitmap as the button image?
regards
Fred
Clipboard.Clear
Clipboard.SetData LoadResPicture(IIf(ToggleEnabled, 101, 102),
vbResBitmap) 'depends on enabled or not!!!!
'Attach our button to the Standard menu bar
Set ToggleBtn =
objInsp.CommandBars("Standard").Controls.Add(Type:=msoControlButton,
Temporary:=True)
With ToggleBtn
.Style = msoButtonIcon
.PasteFace
.Enabled = True
.ToolTipText = LoadResString(150)
End With