对于内置图标可以直接使用其FACEID的ID号,如果不是特别清楚所有的内置图标的FACEID号,可以使用COPYFACE /PASTEFACE。 楼主的意思是使用自定义的图标,则可参见以下代码: Sub NewFace()
Dim Newbutton As CommandBarControl
Set Newbutton = Application.CommandBars("Help").Controls.Add(Type:=msoControlButton, Before:=1)
With Newbutton
.Picture = LoadPicture("C:\Documents and Settings\My Documents\Temp\ry.bmp")
.Caption = "It's a test!"
.Visible = True
End With
End Sub '****************************************************
Sub ResetNow()
Application.CommandBars("Help").reset
End Sub
|