# Visual Basic > Visual Basic .NET >  CustomTaskPane in VSTO Excel Workbook

## 20 Ton Squirrel

I'm working in VS 2022 from a VSTO Excel Workbook project template.  I added a User Control (Windows Forms) object that I would like to load into a custom task pane.  In a VSTO Excel Add-in project, you would access the CustomTaskPanes object from the ThisAddIn object with something like



```
Imports Microsoft.Office.Core

Public Class ThisAddIn
    Private vUserControlTest As UserControlTest
    Private vCustomTaskPane As Microsoft.Office.Tools.CustomTaskPane


    Private Sub ThisAddIn_Startup() Handles Me.Startup
        vUserControlTest = New UserControlTest

         'THIS RIGHT HERE ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
        vCustomTaskPane = Me.CustomTaskPanes.Add(vUserControlTest, "Test Task Pane")
         'THIS RIGHT HERE ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑   

        vCustomTaskPane.Visible = True
    End Sub
End Class
```

I cannot determine where the CustomTaskPanes object resides in the VSTO Workbook object model.  Google returns many examples about CustomTaskPanes but they are all specific to an add-in project, not a workbook project.

Can anyone set me in the right direction?

----------


## schoemr

Hi Squirrel, I had the exact same problem but it was some time ago. I am not sure now what I did (I will have to go check in my project). But I am going to try and maybe it is wrong:



```
vCustomTaskPane = Me.Application.CustomTaskPanes.Add(vUserControlTest, "Test Task Pane")
```

----------

