Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close user form when button is pressed
Hi! i have a button in a user form. when this button is pressed i want the
user form to close. however, i do not seem to manage this. in the code for the button antother program is called. but the problem seems to be that the buttons code is declared private and when i write Close userForm1 the computer says it is incompatible types. help!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Close user form when button is pressed
Hi April27,
Look at the Unload statement in VBA help. The following worked for me: '============= Private Sub CommandButton1_Click() Unload Me End Sub '<<============= --- Regards, Norman "april27" wrote in message ... Hi! i have a button in a user form. when this button is pressed i want the user form to close. however, i do not seem to manage this. in the code for the button antother program is called. but the problem seems to be that the buttons code is declared private and when i write Close userForm1 the computer says it is incompatible types. help!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Close User Form | Excel Discussion (Misc queries) | |||
User form x button | Excel Programming | |||
Open Only the User Form ... or Close Everything ! | Excel Programming | |||
Form Close Button | Excel Programming | |||
Form Close button | Excel Programming |