Shrinking Listbox

G

Guest

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.
 
G

Guest

What functions do you perform in your

Private Sub Workbook_Open()

procedure? Post the code (if it is not too long.)
 
G

Guest

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
 

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

Similar Threads


Top