H
hedonists
I built a custom tool bar for my applicatoin. It works ok on PC Excel. But I
got an error message on a Mac Excel:
Run-time error '-2147483640(-7FFFFFF8)':
Method 'FaceId' of object 'CommandBarButton' failed
If I comment out the .FaceId = 642
Then the error message becomes
Method 'OnAction' of object 'CommandBarButton' failed
The original code in VBA look like this:
...............
Set NewBtn1 = Application.CommandBars("Lenses Design").Controls.Add(Type:=
msoControlButton)
With NewBtn1
.FaceId = 642
.OnAction = "ThisWorkbook.LensDesign"
.Caption = "Design"
.TooltipText = "Design aerodynamic lenses"
.Style = 3
End With
...............
Does anybody know how to solve this problem?
Thanks a lot.
got an error message on a Mac Excel:
Run-time error '-2147483640(-7FFFFFF8)':
Method 'FaceId' of object 'CommandBarButton' failed
If I comment out the .FaceId = 642
Then the error message becomes
Method 'OnAction' of object 'CommandBarButton' failed
The original code in VBA look like this:
...............
Set NewBtn1 = Application.CommandBars("Lenses Design").Controls.Add(Type:=
msoControlButton)
With NewBtn1
.FaceId = 642
.OnAction = "ThisWorkbook.LensDesign"
.Caption = "Design"
.TooltipText = "Design aerodynamic lenses"
.Style = 3
End With
...............
Does anybody know how to solve this problem?
Thanks a lot.