Bridge Guy
New Member
- Joined
- Nov 9, 2023
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
I am developing a VSTO Excel Add-in using Visual Studio. I have attempted to use a declaration statement for a button control that is directly from an article on the Microsoft Learn website. The article is named “Walkthrough: Add controls to a worksheet at run time in VSTO add-in project”.
I have attempted to use the declaration for a button that I would like to programmatically add to a worksheet. The declaration in the referenced walkthrough example is:
Dim button As New Microsoft.Office.Tools.Excel.Controls.Button()
When using this declaration the IDE gives the error BC30002 ‘Type ‘Microsoft.Office.Tools.Excel.Controls.Button’ is not defined. The object browser does not list ‘Controls’ under Microsoft.Office.Tools.Excel.
Suggestions welcome.
I have attempted to use the declaration for a button that I would like to programmatically add to a worksheet. The declaration in the referenced walkthrough example is:
Dim button As New Microsoft.Office.Tools.Excel.Controls.Button()
When using this declaration the IDE gives the error BC30002 ‘Type ‘Microsoft.Office.Tools.Excel.Controls.Button’ is not defined. The object browser does not list ‘Controls’ under Microsoft.Office.Tools.Excel.
Suggestions welcome.