Now I see what you are up to. The form that you created has a modal property.
In the VBE click on View - Properties to bring up the properties window if
it is not already displayed. Select the form and Scroll down the list to a
property called ShowModal. Change it from True to False. Now run the form...
--
HTH...
Jim Thomlinson
"David" wrote:
I am new to VB so please bear with me,
I started Excel, Alt F11, created a form with command buttons.
When I click "run" and select "run sub/userForm(F5), the form appears in run
mode in the middle of excel spreadsheet. I click one of the command buttons
in which I have all my code. After the code finishes excecution, the form is
in the middle of spreadsheet 1(which is created by running code from the
command button). I can move the from but I cannot do anything in excel
unless I click (X button) to close the form.
I first inserted you code "UserForm1.Show False" in the command button code
then I inseted it in "UserForm_Click()" I got errors both times.
Thanks
"Jim Thomlinson" wrote:
How do you bring up your form? At some point you have to load the form. It is
at this point that you want to specify it as non-modal.
Forms are either modal (have exclusive focus) or non-modal. The code that I
posted makes the form non-modal so that you can select outside of the form.
--
HTH...
Jim Thomlinson
"David" wrote:
Thanks for the reply,
Where do I insert this command?
I inseted it in the main command button that runs my program and got an error.
Thanks
"Jim Thomlinson" wrote:
The show method has one optional argument which specifies if the form is
modal or not. Set it to false...
UserForm1.Show False
--
HTH...
Jim Thomlinson
"David" wrote:
Hello,
I created a form that has some buttons. When pressed some code excecutes
and creates an excel spreadsheet.
However I cannot access/modify the sheet unless I close the form window.
Is there any way to keep the from visible/accessible while working with the
spreadsheet?
Thanks