ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform question (https://www.excelbanter.com/excel-programming/280738-userform-question.html)

John Holland

Userform question
 
Something strange is happening in a code with userforms. I am developing
some code which uses a few userforms. A second userform is called from a
command button on the first userform. Then while in the middle of processing
code from that second userform, program control is suddenly transferred to a
Listbox_click code of the first Userform without any apparent reason. Anyone
have a clue as to what could be causing that ?
Thanks,
JH



bob

Userform question
 
Are you hiding or unloading the first form before loading
and showing the second form?

Try the following

....button clicked...
unload me 'or you could use me.hide
FormNumber2.show

-----Original Message-----
Something strange is happening in a code with userforms.

I am developing
some code which uses a few userforms. A second userform

is called from a
command button on the first userform. Then while in the

middle of processing
code from that second userform, program control is

suddenly transferred to a
Listbox_click code of the first Userform without any

apparent reason. Anyone
have a clue as to what could be causing that ?
Thanks,
JH


.


John Holland

Userform question
 
thanks Bob, i had just also discovered it myself, cheers
JH

"bob" wrote in message
...
Are you hiding or unloading the first form before loading
and showing the second form?

Try the following

...button clicked...
unload me 'or you could use me.hide
FormNumber2.show

-----Original Message-----
Something strange is happening in a code with userforms.

I am developing
some code which uses a few userforms. A second userform

is called from a
command button on the first userform. Then while in the

middle of processing
code from that second userform, program control is

suddenly transferred to a
Listbox_click code of the first Userform without any

apparent reason. Anyone
have a clue as to what could be causing that ?
Thanks,
JH


.





All times are GMT +1. The time now is 03:40 PM.

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