API: Hide Task Pane toggle: SetToolbarVisibility doesn't compile.

I got the idea for a Task Pane display toggle from this post. Then add a macro button placed at the top of the UI for a quick switch.
However, SetToolbarVisibility() doesn't compile and I lack the requisite understanding to figure out why not.
Using debug.print, Viz, notViz and swTaskPaneToolbar return correctly.

Thank you ahead for any insight offered.


Dim swApp As SldWorks.SldWorks
Dim Viz As Boolean
Dim notViz As Boolean

Sub main()

Set swApp = Application.SldWorks
Viz = swApp.GetToolbarVisibility(30)
notViz = Not Viz
swApp.SetToolbarVisibility(swTaskPaneToolbar, notViz)
End Sub