View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
chatterbox chatterbox is offline
external usenet poster
 
Posts: 11
Default Retaining focus on a textbox / listbox item pair after validation = false.


Bill Renaud wrote:

It looks to me like you should add an "Update" button for the user to click
after they have selected an item in the list, then entered the conversion
rate in the text box. This could be the default button. When the user
presses the return key, validation would be performed, and focus returned to
the text box for editing, if necessary.

Otherwise, if the user simply selects another list item, Excel doesn't know
whether to apply the conversion rate to the previously selected list item.
Maybe nothing should be done, because the user simply selected the wrong
item in the list box.

Good form design usually means that the Cancel button also exits from the
form, just like the OK button, but any changes are cancelled (undone). If
the user selects an item in the list box, enters a conversion rate in the
text box, and then decides to hit the Cancel button, what should happen?
Should all previous changes/entries be undone?
--
Regards,
Bill


Thanks Bill for the advice.

I started down the road you advised, but then had an all too rare flash
of inspiration. I used the textbox_Exit event to kick off the
validation. If it validated good, no action was taken. If it validated
false it locked the list box, passed a message to the user and set
focus back on the text box. I have included OK and Cancel command
buttons as you suggest.

Thanks again.

chatterbox