ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UserForm (https://www.excelbanter.com/excel-programming/359961-userform.html)

Andy the Yeti

UserForm
 
Hi all,

Can some please tell me the command to close a user form after a command
button has been pressed.

Many thanks
Andy

Jim Thomlinson

UserForm
 
Depends whether you want to unload the form or merely hide it. If you want to
bring it back looking the same as the user left it then just hide the form.
Additionally if you want to get data from the form into the rest of your
application often it is best to just hide it.

The two possibles are

userform1.hide
and
unload userform1

You could also use
me.hide
or
unload me
--
HTH...

Jim Thomlinson


"Andy the yeti" wrote:

Hi all,

Can some please tell me the command to close a user form after a command
button has been pressed.

Many thanks
Andy



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

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