Add Task Pane View Example (VBA)
This example shows how to add an ActiveX control to the Task Pane.
'----------------------------------
' Preconditions: Specified bitmap exists.
'
' Postconditions: Tab showing the specified bitmap is
added to the Task Pane.
' Clicking
this tab displays the Microsoft Calendar ActiveX control.
'-----------------------------------
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim ctrl As SldWorks.TaskpaneView
Dim bitmap As String
Dim toolTip As String
Dim ctrlName As String
Dim ctrlLicKey As String
Sub main()
Set swApp = Application.SldWorks
'
Specify the full path and filename of your bitmap in the next statement
bitmap
= "C:/samples/calendar.bmp"
toolTip
= "Microsoft Calender"
ctrlName
= "MSCAL.Calendar"
ctrlLicKey
= ""
Set
ctrl = swApp.CreateTaskpaneView2(bitmap,
toolTip)
ctrl.AddControl ctrlName, ctrlLicKey
End Sub