• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Private sub but still visible to other subs

Costas

Member
Hi Chandoo,

I created a number of projects in a module and password protected all my code for viewing.
I then created two buttons in excel and linked them to the projects that the users should have access to. When testing access, I realised that all my projects were listed and could be be run by users through View Macros (Alt+F8). Then to remove the projects that the users should not access, I made them Private Subs but the problem now is that the two visible projects also do not have access to the private subs.

Is there another way round this just like protecting a sheet using userInterfaceOnly:=True?

Thanks
Costas
 
try this instead of making the sub private

Code:
Sub What_Ever(Optional a As String)

The macro can be called as per normal from anywhere but never shows in the Alt+F8 macro dialogue.
 
Back
Top