ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   want form to open without seeing worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/210187-want-form-open-without-seeing-worksheet.html)

Ruth

want form to open without seeing worksheet
 
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

FSt1

want form to open without seeing worksheet
 
hi
a workbook must contain at least 1 visible sheet so it's not possible to
hide all sheets until one is selected.
i would recomend that you select a "default start point" and open the
workbook to that point.
Private Sub Workbook_Open()
frmCaptain.Show
sheets("sheet1").activate 'pick your own
cellls(1,1).activate
End Sub

regards
FSt1

"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


FSt1

want form to open without seeing worksheet
 
hi
afterthought
it might be better to select the sheet and cell first then show the form.
Private Sub Workbook_Open()
sheets("sheet1").activate 'pick your own
cellls(1,1).activate
frmCaptain.Show
End Sub

regards
FSt1


"FSt1" wrote:

hi
a workbook must contain at least 1 visible sheet so it's not possible to
hide all sheets until one is selected.
i would recomend that you select a "default start point" and open the
workbook to that point.
Private Sub Workbook_Open()
frmCaptain.Show
sheets("sheet1").activate 'pick your own
cellls(1,1).activate
End Sub

regards
FSt1

"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


Gary''s Student

want form to open without seeing worksheet
 
Is it possible to make the form REALLY big; size it to total hide the Excel
application??
--
Gary''s Student - gsnu200813


"FSt1" wrote:

hi
afterthought
it might be better to select the sheet and cell first then show the form.
Private Sub Workbook_Open()
sheets("sheet1").activate 'pick your own
cellls(1,1).activate
frmCaptain.Show
End Sub

regards
FSt1


"FSt1" wrote:

hi
a workbook must contain at least 1 visible sheet so it's not possible to
hide all sheets until one is selected.
i would recomend that you select a "default start point" and open the
workbook to that point.
Private Sub Workbook_Open()
frmCaptain.Show
sheets("sheet1").activate 'pick your own
cellls(1,1).activate
End Sub

regards
FSt1

"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


Tom Hutchins

want form to open without seeing worksheet
 
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


Ruth

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



All times are GMT +1. The time now is 07:55 PM.

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