简体   繁体   中英

How to fill a drop-down list with the names of the columns in Excel VBA?

I work from a table with 3 columns and I want to fill a drop-down list with the names of the columns. I wrote this code but it doesn't work. I only have the name of the first column

ActiveSheet.DropDowns("Zone combinée 3").ListFillRange = Application.Transpose("'Opoci'!$A$1:$C$1")

Could you, please, help me?

Regards

The ControlFormat.ListFillRange property only accepts a string of an address like

.ListFillRange = "A1:A10" 

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