ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Show Form and Hide Worksheet on Load (https://www.excelbanter.com/excel-programming/375130-show-form-hide-worksheet-load.html)

Chris George

Show Form and Hide Worksheet on Load
 
Hi, im new to this so would appreciate any help form you peeps.

I wish to open my excel file "tester.xls" and open form on load which I have
successfully managed "BscrapeForm" but I wish to also hide "ThisWorkbook" on
load too.

Could anyone assist with the code.

Thanks in Advance

Chris



Stopher

Show Form and Hide Worksheet on Load
 
I don't know about hiding the workbook but you can hide the sheets by:

Sheets([Insert Sheet name here]).Visible = False

Hope this helps, maybe putting workbook in there might work as well.

Stopher


Chris George

Show Form and Hide Worksheet on Load
 

Sheets([Insert Sheet name here]).Visible = False

Hope this helps, maybe putting workbook in there might work as well.


Cheers mate but unfortunatly it does not like the syntax, maybe I should
reiterate what im trying to do I have written a vba within excel and when
loading the *.xls I only want to see the form, nothing else not even the
excel application if possible..

Thanks

Chris



Stopher

Show Form and Hide Worksheet on Load
 

Chris George wrote:
Sheets([Insert Sheet name here]).Visible = False

Hope this helps, maybe putting workbook in there might work as well.


Cheers mate but unfortunatly it does not like the syntax, maybe I should
reiterate what im trying to do I have written a vba within excel and when
loading the *.xls I only want to see the form, nothing else not even the
excel application if possible..

Thanks

Chris


Did you put the sheet name in "" ?

Don't think it's going to be possible to not having the host app
running when you have your form showing.


Tom Ogilvy

Show Form and Hide Worksheet on Load
 
Something along the lines of

Private Sub Workbook_Open()
Application.Visible = False
Userform1.Show
Application.Visible = True
End Sub


The application has to open, so you can't totally hide it. It will flash.

--
regards,
Tom Ogilvy



"Chris George" wrote in message
...

Sheets([Insert Sheet name here]).Visible = False

Hope this helps, maybe putting workbook in there might work as well.


Cheers mate but unfortunatly it does not like the syntax, maybe I should
reiterate what im trying to do I have written a vba within excel and when
loading the *.xls I only want to see the form, nothing else not even the
excel application if possible..

Thanks

Chris





JLGWhiz

Show Form and Hide Worksheet on Load
 
Will the form and/or any of the controls on the form be able to interact with
the worksheets when they are not visible? I know you have to unhide a
worksheet to use it interactively.

"Tom Ogilvy" wrote:

Something along the lines of

Private Sub Workbook_Open()
Application.Visible = False
Userform1.Show
Application.Visible = True
End Sub


The application has to open, so you can't totally hide it. It will flash.

--
regards,
Tom Ogilvy



"Chris George" wrote in message
...

Sheets([Insert Sheet name here]).Visible = False

Hope this helps, maybe putting workbook in there might work as well.


Cheers mate but unfortunatly it does not like the syntax, maybe I should
reiterate what im trying to do I have written a vba within excel and when
loading the *.xls I only want to see the form, nothing else not even the
excel application if possible..

Thanks

Chris






Chris George

Show Form and Hide Worksheet on Load
 
Something along the lines of

Private Sub Workbook_Open()
Application.Visible = False
Userform1.Show
Application.Visible = True
End Sub


The application has to open, so you can't totally hide it. It will flash.

--
regards,
Tom Ogilvy


Thanks Tom that has done the trick exactly how I wanted it!



Tom Ogilvy

Show Form and Hide Worksheet on Load
 
You can certainly work with the sheets/worbooks with code.

I know you have to unhide a
worksheet to use it interactively.

Yes, it would be difficult to manually interact with a worksheet if you
couldn't see it. But the OP wanted to work with it from his Userform - so
that should be no problem.

--
Regards,
Tom Ogilvy

"JLGWhiz" wrote in message
...
Will the form and/or any of the controls on the form be able to interact
with
the worksheets when they are not visible? I know you have to unhide a
worksheet to use it interactively.

"Tom Ogilvy" wrote:

Something along the lines of

Private Sub Workbook_Open()
Application.Visible = False
Userform1.Show
Application.Visible = True
End Sub


The application has to open, so you can't totally hide it. It will
flash.

--
regards,
Tom Ogilvy



"Chris George" wrote in message
...

Sheets([Insert Sheet name here]).Visible = False

Hope this helps, maybe putting workbook in there might work as well.

Cheers mate but unfortunatly it does not like the syntax, maybe I
should
reiterate what im trying to do I have written a vba within excel and
when
loading the *.xls I only want to see the form, nothing else not even
the
excel application if possible..

Thanks

Chris









All times are GMT +1. The time now is 10:56 PM.

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