![]() |
Shrinking Listbox
I have placed a listbox in Sheet1. The listbox displays 10 items. I noticed
that everytime I open the Excel spreadsheet, the listbox shrinks and display 1 item less. The "shrinking" effect will stop when the listbox displays 3 items. How do I stop this "shrinking" effect on the list box? Any help will be very much appreciated. Thank you. |
Shrinking Listbox
What functions do you perform in your
Private Sub Workbook_Open() procedure? Post the code (if it is not too long.) "Francis Ang" wrote: I have placed a listbox in Sheet1. The listbox displays 10 items. I noticed that everytime I open the Excel spreadsheet, the listbox shrinks and display 1 item less. The "shrinking" effect will stop when the listbox displays 3 items. How do I stop this "shrinking" effect on the list box? Any help will be very much appreciated. Thank you. |
Shrinking Listbox
Hi Charlie,
Here is my codes - Worksheets("Sheet1").ListBox1.Clear Open "C:\File" For Input As #1 Do While Not EOF(1) Line Input #1, inputdata Worksheets("Sheet1").ListBox1.AddItem inputdata If EOF(1) Then Close #1 Exit Sub End If Loop "Charlie" wrote: What functions do you perform in your Private Sub Workbook_Open() procedure? Post the code (if it is not too long.) "Francis Ang" wrote: I have placed a listbox in Sheet1. The listbox displays 10 items. I noticed that everytime I open the Excel spreadsheet, the listbox shrinks and display 1 item less. The "shrinking" effect will stop when the listbox displays 3 items. How do I stop this "shrinking" effect on the list box? Any help will be very much appreciated. Thank you. |
All times are GMT +1. The time now is 11:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com