ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Form Doesn't Disappear (https://www.excelbanter.com/excel-programming/313479-form-doesnt-disappear.html)

Stratuser

Form Doesn't Disappear
 
I have a form with option buttons on it. In the code for one of the option
buttons, there are just two commands, set up like this:

Me.Hide
Macro1

Macro1 turns screen updating off and then does a lot of other things. But
the form doesn't disappear before Macro1 starts. Why is that? I don't want
to look at the form frozen on the screen while the macro is running. I want
it to disappear as soon as I pick the option.

Bob Phillips[_6_]

Form Doesn't Disappear
 
Try running the macro after the code that shows the form

Userform1.Show
Macro1

not in the userform code

--

HTH

RP

"Stratuser" wrote in message
...
I have a form with option buttons on it. In the code for one of the

option
buttons, there are just two commands, set up like this:

Me.Hide
Macro1

Macro1 turns screen updating off and then does a lot of other things. But
the form doesn't disappear before Macro1 starts. Why is that? I don't

want
to look at the form frozen on the screen while the macro is running. I

want
it to disappear as soon as I pick the option.




Kari

Form Doesn't Disappear
 
try
Unload.Me
before running Macro1
"Stratuser" wrote:

I have a form with option buttons on it. In the code for one of the option
buttons, there are just two commands, set up like this:

Me.Hide
Macro1

Macro1 turns screen updating off and then does a lot of other things. But
the form doesn't disappear before Macro1 starts. Why is that? I don't want
to look at the form frozen on the screen while the macro is running. I want
it to disappear as soon as I pick the option.



All times are GMT +1. The time now is 12:35 PM.

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