ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   After Workbook closes all my combo boxes do not retain dropdown list. (https://www.excelbanter.com/excel-programming/281746-after-workbook-closes-all-my-combo-boxes-do-not-retain-dropdown-list.html)

cwsax

After Workbook closes all my combo boxes do not retain dropdown list.
 
Hi all,

I wrote a module that populates all Combo Boxes (ActiveX
Controls) when a check box is clicked and whenever I save
and exit the workbook the combo boxes empty. Is there a
way to make the value of the Combo Boxes to stick around
after the workbook closes? Below is an example of the
code for one of my Combo Boxes. Any hints would be
greatly appreciated. Excel 2000.

Public Sub Specify_Network_Speed()

If Sheets("Input").cboNetworkSpeed.ListIndex < 0 Then

Sheets("Input").cboNetworkSpeed.AddItem ""
Sheets("Input").cboNetworkSpeed.AddItem "10 Mbps"
Sheets("Input").cboNetworkSpeed.AddItem "100 Mbps"
Sheets
("Input").cboNetworkSpeed.AddItem "Other/mixed"

'Use a drop down list
Sheets("Input").cboNetworkSpeed.Style =
fmStyleDropDownList

'Combo box values are ListIndex values
Sheets("Input").cboNetworkSpeed.BoundColumn = 0

'Set Combo Box first entry
Sheets("Input").cboNetworkSpeed.ListIndex = 0

End If

End Sub




All times are GMT +1. The time now is 10:22 PM.

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