R
Reinfried Englmair
I work with OWC10.
I add in the toolbar a new button with this code:
Sub CustomizeToolbar()
Dim tb
Dim btnNewButton
Dim tbrDefault
' Set a variable to the PivotTableList control's
toolbar.
Set tb = ptable.Toolbar
On Error Resume Next
' Add the image for your custom command to the
toolbar's image list.
'
' Note: You must use a Universal Naming Convention
(UNC) or HTTP path to load the image
' into the image list.
tb.ImageList.ListImages.Add , "MyImage", LoadPicture
("\\servername\directory\PrintCube.gif")
' Trap the potential permissions error.
If Err.Number > 0 Then
' Alert the user.
MsgBox "For security reasons, the script cannot
load PrintCube.gif from" & _
" your hard disk. You must access
PrintCube.gif via a UNC or HTTP" & _
" path."
' Exit the subroutine.
Exit Sub
End If
On Error Goto 0
Set btnNewButton = tb.Buttons.Add(4, "Print with
Excel", , tbrDefault, "MyImage")
' Set the tool tip text.
btnNewButton.ToolTipText = "Print with Excel"
ptable.DisplayScreenTips = True
End Sub
But btnNewButton.ToolTipText = "Print with Excel" shows
NO tooltiptext.
Is this a Bug?????????????
Thanks to all for an answer.
I add in the toolbar a new button with this code:
Sub CustomizeToolbar()
Dim tb
Dim btnNewButton
Dim tbrDefault
' Set a variable to the PivotTableList control's
toolbar.
Set tb = ptable.Toolbar
On Error Resume Next
' Add the image for your custom command to the
toolbar's image list.
'
' Note: You must use a Universal Naming Convention
(UNC) or HTTP path to load the image
' into the image list.
tb.ImageList.ListImages.Add , "MyImage", LoadPicture
("\\servername\directory\PrintCube.gif")
' Trap the potential permissions error.
If Err.Number > 0 Then
' Alert the user.
MsgBox "For security reasons, the script cannot
load PrintCube.gif from" & _
" your hard disk. You must access
PrintCube.gif via a UNC or HTTP" & _
" path."
' Exit the subroutine.
Exit Sub
End If
On Error Goto 0
Set btnNewButton = tb.Buttons.Add(4, "Print with
Excel", , tbrDefault, "MyImage")
' Set the tool tip text.
btnNewButton.ToolTipText = "Print with Excel"
ptable.DisplayScreenTips = True
End Sub
But btnNewButton.ToolTipText = "Print with Excel" shows
NO tooltiptext.
Is this a Bug?????????????
Thanks to all for an answer.