+ Reply to Thread
Results 1 to 8 of 8

Make a Module to be Hidden

  1. #1
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Make a Module to be Hidden

    Hi guys,

    'Is there a way to make a module to be hidden? Not to appear it when you press Alt F8 and to see the macro from each module?

    I would like to have something like we hide a sheet on a file. Is this possible also in VBA?

    Thank you,
    Ionut
    Last edited by IonutC; 08-26-2016 at 10:02 AM.
    Please consider:
    Be polite. Thank those who have helped you.
    Click the star icon in the lower left part of the contributor's post and add Reputation. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Make a Module to be Hidden

    You can password protect the entire VBA Project so that someone cannot open it without the password.
    http://www.excel-easy.com/vba/exampl...ect-macro.html
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: Make a Module to be Hidden

    Thank you!

    I want to have a hidden module that is not visible. I don't want to put a pass. I know this, but i need to hide a module that is not visible for other users.
    Please Login or Register  to view this content.
    Kr,
    Ionut

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Make a Module to be Hidden

    To hide the subroutine in a module from Alt + F8 window .. Just add the word Private before the word Sub

    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Make a Module to be Hidden

    @ YasserKhalil,

    To hide the subroutine in a module from Alt + F8 window .. Just add the word Private before the word Sub
    I must admit that I never knew that! How would you access it again should you need to change some of the Code?

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Make a Module to be Hidden

    You can simply put form button on the sheet and right-click and assign macro (Before putting the word Private) ..
    Then after assigning the subroutine to the button .. log in VBE and add the word "Private" ..
    That's all

  7. #7
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486
    Quote Originally Posted by YasserKhalil View Post
    You can simply put form button on the sheet and right-click and assign macro (Before putting the word Private) ..
    Then after assigning the subroutine to the button .. log in VBE and add the word "Private" ..
    That's all
    Thank you for your answer Yasser! After i use the edit mode of the module the module becomes private and clicking the button will hide it and not unhide it anymore....

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,441

    Re: Make a Module to be Hidden

    The are a few ways to do it.

    As YasserKhalil mentioned you can make the subroutine private. As long as you can remember the routine name you can still use ALT+8 to assign macro even if the routine is not in the list.

    You can make the routine a function.
    Please Login or Register  to view this content.
    You can also add the following command to the top of the module so all routines within module will be excluded.
    Please Login or Register  to view this content.
    Once assigned the Edit button on macro dialog should still work. Or you can easily get to the code by using ALT+F11 to open VBE editor and the CTRL+F
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Compile error in hidden module: Module 1 when workbook opened on different machine!?
    By MathUKTeacher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2015, 04:38 PM
  2. hidden vba module
    By johndr1804 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2013, 05:24 AM
  3. compile error in hidden module
    By Amit Chauhan in forum Excel General
    Replies: 1
    Last Post: 09-07-2012, 06:22 AM
  4. Compile error in hidden module
    By ciro8 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 03-19-2012, 04:36 PM
  5. compile error in hidden module
    By Armidion in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-10-2007, 02:29 AM
  6. [SOLVED] Compile error in hidden module
    By Totte in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-19-2006, 06:35 AM
  7. Replies: 3
    Last Post: 04-03-2006, 02:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1