ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide Personal Macro in VBA Project Explorer (https://www.excelbanter.com/excel-programming/338507-hide-personal-macro-vba-project-explorer.html)

DavidGold

Hide Personal Macro in VBA Project Explorer
 

Although I hide the perosnal macro workbook in Excel, it still appear i
the VBA project explorer.

How to hide it in the VBA project explorer as well :) ?

Thanks

--
DavidGol
-----------------------------------------------------------------------
DavidGold's Profile: http://www.excelforum.com/member.php...fo&userid=2670
View this thread: http://www.excelforum.com/showthread.php?threadid=39969


Rob Bovey

Hide Personal Macro in VBA Project Explorer
 
"DavidGold" wrote in
message ...
Although I hide the perosnal macro workbook in Excel, it still appear in
the VBA project explorer.
How to hide it in the VBA project explorer as well :) ?


Hi David,

There's no way to hide a standard Excel workbook like Personal.xls
(which is just a hidden workbook, choose Window/Unhide from the Excel menu
and you'll see it) or add-in from the Visual Basic Editor Project Window.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm



Nigel

Hide Personal Macro in VBA Project Explorer
 
You can hide it - but the user can still unhide, the macros will also be
visible. I use the following method in the workbook open event, to close
the Personal.xls if there is one.

' if user has a personal.wks in xlstart directory - close it!
Dim wb As Workbook
For Each wb In Application.Workbooks
If UCase(wb.Name) = "PERSONAL.XLS" Then
Application.DisplayAlerts = False
wb.Close
Application.DisplayAlerts = True
End If
Next


--
Cheers
Nigel



"DavidGold" wrote in
message ...

Although I hide the perosnal macro workbook in Excel, it still appear in
the VBA project explorer.

How to hide it in the VBA project explorer as well :) ?

Thanks.


--
DavidGold
------------------------------------------------------------------------
DavidGold's Profile:

http://www.excelforum.com/member.php...o&userid=26703
View this thread: http://www.excelforum.com/showthread...hreadid=399690




Dave Peterson

Hide Personal Macro in VBA Project Explorer
 
You can't hide it, but you could protect it so that it can't be viewed*.

With that project selected (in the VBE):
tools|VBAProject Properties|Protection tab
give it a nice memorable password (and lock it for viewing)

*Be aware that this kind of protection can be broken pretty quickly--but it will
keep the casual user out of your code.



DavidGold wrote:

Although I hide the perosnal macro workbook in Excel, it still appear in
the VBA project explorer.

How to hide it in the VBA project explorer as well :) ?

Thanks.

--
DavidGold
------------------------------------------------------------------------
DavidGold's Profile: http://www.excelforum.com/member.php...o&userid=26703
View this thread: http://www.excelforum.com/showthread...hreadid=399690


--

Dave Peterson


All times are GMT +1. The time now is 10:06 AM.

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