Unstable listboxes

I have created a form in VBA with several multiselect listboxes, which receive data either from an Access database or from another form. The user selects one or more items from each listbox and then an OK button causes the value in a particular column of each selected item to be written to an Excel spreadsheet. I have been working in Excel 2000 and the application works fine in that environment, but when it is run in Excel 97 the listboxes display an unwelcome resizing behaviour. At one point in the process the user selects a name from a list and clicks on a listbox, causing data pertaining to that name to be drawn from a database and displayed in all the listboxes, according to the criteria represented by each. It is at this point that all the listboxes on the form reduce to about a third of their rightful width, blocking out most of the data within. I have tried resetting the width of the listboxes at the end of the associated event procedure, but although that maintains the width, it also throws the internal structure of the control into disarray. On some listboxes a blank section is attached to the third with the data, with a thin dividing border between the two sections. On some others the width of the columns is considerably altered, again causing some of the data to be truncated.

Has anyone else encountered this phenomenon? I would very much appreciate if someone could shed some light on this problem.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories