Application Visible

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have created a worksheet start with a Userform and with the command
Private Sub UserForm_Initialize()
Application.Visible = False
end sub

only the userform is visible for users and not the worksheet. This works
fine. Only thing is that with this option all my open worksheets are hidden.
Only by closing this worksheet all my other opened excelsheets are visible
again. IS there a way to only hide the worksheet i want to hide and to be
able to work with others at the same time.

Thanks in advance!

Kind regards,

Frank
 
Hi,

Thanks a lot for the quick reaction, but this is not what i meant. With
these commands only mu worksheet (employees) is hidden. I want all worksheets
to be hidden (same as with the command application.visible = false) but it
shouldn't hide my other opened excel files.
Example: If i have opened to excel files and i open my program all three
files are hidden. By closing my excel file the other two excel files are
shown again.

KR

Frank

"Tom Ogilvy" schreef:
 
How about:

Dim Sheet As Worksheet
For Each Sheet In ThisWorkbook.Sheets
Sheet.Visible = False
Next Sheet
 
ActiveWindow.Visible = False

or

Windows("MyWorkbook.xls").Visible = False

Another possibility is to make your workbook an Addin. (which may be what
you really want). You can do this in the VBE by changing the IsAddin
property (to True) of the ThisWorkbook member of the Project/Workbook.



Just for information, Charlie's suggestion will error, because at least one
sheet must be visible when hiding sheets.
 
Back
Top