View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Display toolbar icons on form button

Andrew,

Following approach works for xlXP and xl2003 only..


Private Sub UserForm_Initialize()

With Application.CommandBars(1)
With .Controls.Add(temporary:=True)
.FaceId = 59
Me.CommandButton1.Picture = .Picture
.Delete
End With
End With
End Sub





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


wrote :

If I know the FaceID of a commandbar picture I can easily display it
on a toolbar button. But what if I want to display the picture on a
form button?

The only way I can think of is to make a screen shot of the icon and
save it as a bitmap so that I can then link it to my button. This
seems pretty messy though - does anyone know of a more straight foward
approach?

Thanks in advance,
Andrew