View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken McLennan[_6_] Ken McLennan[_6_] is offline
external usenet poster
 
Posts: 5
Default Userform Control validity check

G'day there One & All,

I've Googled for a resolution to my issue, but without success. Others
asking about similar problems either have no response, or answers that
don't help me at all :(

I have a userform with a combobox; 2 textboxes; and 2 multiselect
listboxes. Altogether with some other bits & pieces it constitutes the
data entry form for a simple Excel database.

To ensure a valid record I require an entry in each of the controls.
When the "Enter Data" control button is clicked I have code which checks
each control for an entry. If any control has no entry, the background
changes to a bright colour & the record is not saved.

All seems to work fine until we come to the listboxes. They are being
cleared when read for the data validation. It makes no difference
whether any field has valid data or not, the listbox entries are cleared
every time (obviously, the other controls have no effect on them).

Is there anyway to make the entries a tad less volatile?

I'm using XL 2002 on XP. I don't recall what we use at work, but it
seems to be fully compatible with XP.

Thanks for reading this far,
Ken McLennan
Qld Australia