View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Ruth Ruth is offline
external usenet poster
 
Posts: 132
Default want form to open without seeing worksheet

Thank-you - that worked.
--
Thank-you!
Ruth


"Tom Hutchins" wrote:

You can hide the Excel application when your form is displayed. Put this code
in the form's code module:

Private Sub UserForm_Activate()
'Hide Excel when this form is activated
Application.Visible = False
End Sub

When the user has selected a worksheet from the combobox, you will need some
event code like this (in the form's code module):

Application.Visible = True
Sheets("SelectedSheet").Activate
Unload Me

Be sure to include the Application.Visible = True statement before unloading
the form, or you will have a hidden instance of Excel running.

Hope this helps,

Hutch

"Ruth" wrote:

Hi there

I have a file that when opened a form automatically opens. The code I used
is:


Private Sub Workbook_Open()
frmCaptain.Show
End Sub

I want it to open so the user just sees the form until they select a
worksheet from the combo box on the form. The combo box on the form is
already in place and working.


In other words, I don't want the worksheets to show when the file is opened,
just the form should show. Then the worksheet can show once selected on the
form.

Is this possible? if so, how?



--
Thank-you!
Ruth