ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Forms and Exception occured errors (https://www.excelbanter.com/excel-programming/309055-forms-exception-occured-errors.html)

Roy Miller[_5_]

Forms and Exception occured errors
 
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

--
Message posted from http://www.ExcelForum.com


Bob Kilmer

Forms and Exception occured errors
 
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

"Roy Miller " wrote in message
...
hi

I am using multi forms all of them in modal.

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

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

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

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

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

Totally bamboozled, any ideas ?

Roy


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 08:00 AM.

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