LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Retaining focus on a textbox / listbox item pair after validation = false.

Hi Everybody.

I have a wee problem that has evaded my best efforts over the past
couple of days and I hope one of you out there can shine some light for
me.

The problem centres on two form controls. Essentially there is a text
box and a list box. For each entry of the list the user must enter a
conversion rate into the text box. The user clicks a list item then
enters a value into the text box. The user then either clicks another
list item or decides to do something else. My problem begins with
validation of the text box entry. I do not wish to use a textbox_change
event, but rather wait until the user clicks another list item or other
control, before I trigger the validation. If validation is true, no
problems. However, if validation is false, eg. the user entered a word
string, no matter how I code it, using textbox_Exit (with Cancel =
true, or enable = false then true, etc) or other text box event, or a
_listbox event, I am not able to figure out how to both keep focus on
the incorrect text box entry and force the list box to stay on the
offending list item. My best to date has been to keep focus on the
textbox offending entry, but the listbox moves to the new user
selection.

If anybody can shed some light on how I might do this without having to
include a dedicated 'OK' button for each new user entry, I would be
most grateful

Ciao for now.

chatterbox

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to pair each item on one list to each item on another list Peter R. Excel Worksheet Functions 1 August 24th 07 03:04 AM
How to tell what textbox got the focus vqthomf Excel Programming 2 November 18th 05 01:09 PM
Retaining value of a string from a textbox on a form ?? Dan Thompson Excel Programming 6 October 28th 04 09:00 PM
TextBox Focus Tom Ogilvy Excel Programming 0 June 3rd 04 04:55 PM
Retaining text formatting in TextBox Tom Ogilvy Excel Programming 0 September 9th 03 08:05 PM


All times are GMT +1. The time now is 03:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"