View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
cwsax cwsax is offline
external usenet poster
 
Posts: 3
Default 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