ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to link macro to change an item in drop-down list (https://www.excelbanter.com/excel-discussion-misc-queries/186437-how-link-macro-change-item-drop-down-list.html)

Amotif

How to link macro to change an item in drop-down list
 
As part of a small macro I am writing, I want the macro to change (or pick
up) an item from drop-down list in a combo box. On completion, the macro
functions on all areas except changing the item on the drop-down list.

joel

How to link macro to change an item in drop-down list
 
Use Listindex which starts at zero for the first item

ActiveSheet.ComboBox1.ListIndex = 6

for i = 0 to (ActiveSheet.ComboBox1.Listcount - 1)
ActiveSheet.ComboBox1.ListIndex = i
next i

"Amotif" wrote:

As part of a small macro I am writing, I want the macro to change (or pick
up) an item from drop-down list in a combo box. On completion, the macro
functions on all areas except changing the item on the drop-down list.



All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com