ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding worksheets and workbooks (https://www.excelbanter.com/excel-programming/292671-hiding-worksheets-workbooks.html)

rayzgurl

Hiding worksheets and workbooks
 
I have a workbook with userforms that has been placed on the commo
drive and shared. I have made the sheets hidden and veryhidden usin
the properties in VB. When I open the workbook the sheets are hidden
However, when anyone else opens the workbook, the sheets are visible t
them. How do I go about hiding these worksheets, or even the whol
workbook so that the people using the forms do not see the workbook.

Thanks,
Pa

--
Message posted from http://www.ExcelForum.com


Jim Rech

Hiding worksheets and workbooks
 
I have made the sheets hidden and veryhidden using the properties in VB.


Yours is a puzzling post because (1) it's not possible to hide _all_ the
sheets in a workbook, that is, at least one has to be visible, and (2)
sheets hidden are hidden for all users.

Anyway, if you want a workbook to have no visible presence you should save
it as an add-in. You can do this from the File, Save As dialog and also by
changing its IsAddin property to True.

If you do this there has to be some way to trigger the userform to open, but
I assume you've already got that going (like an Workbook_Open event
procedure).

--
Jim Rech
Excel MVP



rayzgurl

Hiding worksheets and workbooks
 
Thanks for your reply Jim...

I do have an extra worksheet blank worksheet that I left as visible
All other worksheets are hidden using the properties box in VB. I d
agree that it is strange that when I open the workbook, all the page
are hidden. However, when anyone else opens the workbook, they can se
all the worksheets.

I'm not familiar with using add-ins, can you be a bit more exact in ho
to go about saving the workbook as an addin so it can not be seen
Also, if I save it as an addin, will the workbooks I have linked to i
be affected?

Thanks!
-Pa

--
Message posted from http://www.ExcelForum.com


Jim Rech

Hiding worksheets and workbooks
 
I'm not sure that an add-in will meet all your needs but there's no harm in
experimenting (having backups saved<g).

As I said, just do a File, Save As with your workbook active. As the bottom
if the file type list in the Save As dialog is Add-in. Excel will volunteer
to save it in your "add-ins" folder but you can use any folder. After you
do the save the open workbook will appear exactly the same *but* there will
now be another file on your drive, but with the extension XLA. That's an
add-in twin of your workbook.

Now you can close your workbook and open the XLA. You will see nothing
because add-ins have no visible presence. But you can see it in the VBE and
change its code and resave it there if you want. As to linked workbooks,
they will not know about the add-in being created. You're going to have to
point them to the add-in by replacing the link to your XLS using Edit, Links
(and save them).

As I said, do this as an experiment. It may be a little weird working with
an invisible workbook but it will achieve your goal of being hidden.

--
Jim Rech
Excel MVP




All times are GMT +1. The time now is 11:28 AM.

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