I have a bizarre problem (to me). I must interrupt my code in VBA in order for the code to run correctly. Either, by setting a breakpoint or inserting a msgbox.
This has to do with setting the listbox .height on the form. The listbox is named “lstAttendees”
To interrupt the code, I use the line: MsgBox "height = " & .Height
If you run it without the msgbox the form will stay small and only show two employees. If I include the msgbox the form expands correctly.
Note: The form adjusts its height based on the listbox height and the listbox height is is based on the number of rows in the data field. There is also a maximum listbox height calculation to avoid problems when there are many columns.
THANKS FOR LOOKING!
Robert
Bookmarks