T
Tom
Hi
I have a version problem. The following script creates an icon on the
toolbar. The problem is, that Excel 97 and Excel 2000 cannot handle the
..Picture property.
Private Sub SetIcon(cbrCtrl As CommandBarButton, shpPict As Shape, shpMask
As Shape)
Dim oMask As StdPicture
If Val(Application.Version) <= 9 Then
shpPict.Copy
cbrCtrl.PasteFace
Else
shpMask.CopyPicture xlScreen, xlBitmap
cbrCtrl.PasteFace
Set oMask = cbrCtrl.Picture
shpPict.CopyPicture xlScreen, xlBitmap
cbrCtrl.PasteFace
cbrCtrl.Mask = oMask
End If
Application.CutCopyMode = False
End Sub
How to program this code without a compile error?
Tom
I have a version problem. The following script creates an icon on the
toolbar. The problem is, that Excel 97 and Excel 2000 cannot handle the
..Picture property.
Private Sub SetIcon(cbrCtrl As CommandBarButton, shpPict As Shape, shpMask
As Shape)
Dim oMask As StdPicture
If Val(Application.Version) <= 9 Then
shpPict.Copy
cbrCtrl.PasteFace
Else
shpMask.CopyPicture xlScreen, xlBitmap
cbrCtrl.PasteFace
Set oMask = cbrCtrl.Picture
shpPict.CopyPicture xlScreen, xlBitmap
cbrCtrl.PasteFace
cbrCtrl.Mask = oMask
End If
Application.CutCopyMode = False
End Sub
How to program this code without a compile error?
Tom