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

C

cwsax

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top