ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   intermittent problem with clearing textboxes on forms (https://www.excelbanter.com/excel-programming/312763-intermittent-problem-clearing-textboxes-forms.html)

Renae[_2_]

intermittent problem with clearing textboxes on forms
 
I have a very frustrating problem which i hope that some of you have
experienced (and preferably solved) just to prove to myself that i am not
going completely insane!

I have written some forms to control the information in the worksheets. I
have a series of list boxes in which the values selected are used in a
series of calculations. The results of these calculations are shown in text
boxes on the same form as the list boxes. So, when the listboxes are
changed, the corresponding calculations are updated and displayed (from a
change event associated with each listbox).

When the form is first displayed, the appropriate listboxes are set with the
value corresponding to the worksheet, as well as the text boxes show the
result of the calculations. If the user need to change the values on the
listboxes, they are able to select a new value (or press a clear button
associated with the listbox) and the text boxes are updated accordingly -
HOWEVER, this doesn't always work for the first click after the form is
first displayed. It 100% of the time works for any subsequent click
(either changing the listbox value by selecting another or clearing it all
together) ie. the text boxes are updated. But for the first change on the
form after it being displayed, it is a bit of a hit and miss afair. For
example, whilst testing it the other day, for 16 times in a row, all worked
fine, but then, the next 10 times, the first click on the form didn't work.

How i think to solve the problem is that the first time the form is
displayed, is there anyway i can force a click event to occur without it
actually doing anything - did that make sense. I just feel that if i can
force such an event to occur, then because everytime every subsequent event
works, i need to MAKE the first event to occur myself.

If anybody has any ideas, all would be greatly appreciated.

Thanks in advance,

Renae





All times are GMT +1. The time now is 07:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com