简体   繁体   中英

Excel Spreadsheet VSTO Controls

I am hoping that someone can tell me what is the proper approach to add various controls (specifically ComboBoxes and Radio Buttons) to an VSTO excel program without using Winform controls.

A little background: I want to do create a solution that will have the benefits of being published as a clickonce application so that the excel spreadsheet can be easily updated for all users. Many of the fields are being added to the Sheets on startup. I am trying to keep it as only an Excel File with no Windows Form application.

I tried the .NET winform buttons, but without a FORM they lag when scrolling around the excel document. I have tried using filling in the combobox options from a hidden sheet, but I could not get the VBA macros to run from within VSTO after the options were added at run time. I tried adding the ActiveX and Microsoft Forms controls directly to Toolbox and then placing them, but I keep getting a NullReferenceException when I try to place them.

Does anyone have an elegant way to approach this.

Add the controls to the Ribbon. You can still programmatically control the state of the controls and populate the relevant lists.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM