Forms and Exception occured errors

R

Roy Miller

hi

I am using multi forms all of them in modal.

When I want another form displayed, via a button click, I 'hide' th
current form and 'show' the one that is required, the second for
becoming visible and accessible, (the former is hidden). All appear
correct.

On the second form there is an option to pop up another form on anothe
button click, so I 'hide' the second form and 'show' the third form, th
third form is now accesible, the other 2 forms are hidden.

When I exit from the 3rd form, whose execution correctly sets values t
a couple of Excel cells, I 'unload' it, and 'show' the 2nd form, an
when I decide to exit the 2nd form, that too is 'unloaded' and th
first form is set to 'show' again and becomes visible. It still retai
the values it had before - which is what I wanted, however, when
change a value on the form I get an 'Exception Occured' error when th
focus changes.

Other info:
(i) If I just go from the first form to the second and back and fort
between the 2 there is never an error.

(ii) If I go from the second form to the third form and back and fort
between the 2 there is never an error.

Totally bamboozled, any ideas ?

Ro
 
B

Bob Kilmer

I cannot tell specifically why you should be getting an error. Perhaps you
are unintentionally referring to a now-defunct form? I would endeavor to
break execution just before changing that value that causes the error and
step thru the code to try to find the exception. You might start by setting
a breakpoint in the Form_Activate event of form 1 or in a got focus or other
event of the control that raises the exception. Think about exactly when in
the course of events the exception occurs. (When you make the first action
to change the value? After you have changed the value and pressed enter?
Etc.)

Bob
 
Top