UserForm shown and worksheet active

  • Thread starter Thread starter Alberto Ast
  • Start date Start date
A

Alberto Ast

Can I have a user form shown and at the same time be able to work on the
worksheet?

I want to be able to click on a buttom of the form but at the same time be
able to work on the worksheet.

Can this be done?
 
hi
yes you can. a form has 2 modes. modal and modeless.
when a form is modal, the user must supply information or close the form
before you can work on any other part of excel. even code pauses and waits
for input.
when the form is modeless, then the form can be displayed but other parts of
excel and be accessed.
look up the show modal property in vb help.
to display the form modeless.....

Load frmUserform1
frmUserform1.Show 0

the zero at the end of show displays the form as modeless.

Regards
FSt1
 
Load frmUserform1
frmUserform1.Show 0

the zero at the end of show displays the form as modeless.

Or more logically, use the built-in, descriptive, constants

Load frmUserform1
frmUserform1.Show vbModeless
 
Note there are behaviour differences. When you reselect a sheet the focus
will still be with the form so you will then need to expressly select the
grid. Also CTRL+F6 to toggle around workbooks will not function if the form
has the focus.
 
Back
Top