简体   繁体   中英

adding a control (ActiveX or not) to a chart (Excel VBA)

I cannot find how to control a listbox I have added to a Excel Chart ie add/delete/select/unselect items and run macros accordingly. I understand it is easier if the chart is embedded in a worksheet however I would very much like to do that on a separate sheet. Thanks. Example:

例

Even though the listbox is on the chart sheet, you should use some worksheet space somewhere for the list fill range and the linked cell. It's much easier and more robust to access these ranges in VBA than to try to get them from the listbox.

Speaking of reliability, the Form versions of all controls will be more reliable than their ActiveX analogues.

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