View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Noob McKnownowt Noob McKnownowt is offline
external usenet poster
 
Posts: 37
Default ListBox content not saved

try

Private Sub Workbook_Open()

ActiveSheet.CmbBoxDay.Clear
ActiveSheet.CmbBoxDay.AddItem ("1")
ActiveSheet.CmbBoxDay.AddItem ("2")
ActiveSheet.CmbBoxDay.AddItem ("3")
ActiveSheet.CmbBoxDay.AddItem ("4")
ActiveSheet.CmbBoxDay.AddItem ("5")
ActiveSheet.CmbBoxDay.AddItem ("6")
ActiveSheet.CmbBoxDay.AddItem ("7")

End Sub

put this code in the 'ThisWorkbook' page on the VB developer enviroment. and
then save

i used a combo box but the effect is the same.

"Paolo Sardi" wrote:

Hi,
I'm working with a ListBox embedded in a worksheet. I noticed that, saving
and closing the workbook, the content of my ListBox is not saved. Is there a
way to make Excel preserve the content of my ListBox?

Thank you.