+ Reply to Thread
Results 1 to 4 of 4

Problem Hiding VBA

  1. #1
    Registered User
    Join Date
    11-07-2008
    Location
    Lincoln
    Posts
    17

    Problem Hiding VBA

    I'm creating an answer sheet for a quiz I've designed for some of my students. I've used VBA to make a picture appear when all the correct answers have been entered and it all works well.

    However, not to be too mean to 15 year olds, many of my students can be devious little feckers, and I want to hide and password protect the VBA code so that they can't just change the pictures visible section to true. I can password protect the workbook and worksheet, but not the VBA.

    I'm entering the Visual Basic editor and I can see my simple script. I then click Tools - VBproject properties - protection. I'm clicking the "Lock Project for Viewing" box then filling in the password and confirming the password and clicking OK. But I can still see and edit my script, despite protecting the sheet and workbook.

    What am I missing?

    Thank for any help you can give.
    Last edited by VBA Noob; 11-07-2008 at 01:50 PM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482
    The lock will not take affect until you re open the workbook.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello bglaugh,

    Welcome to the Forum!

    The protection won't take effect until you close and reopen the workbook. You will then need the password to view the VBA project code.

    Sincerely,
    Leith Ross

  4. #4
    Registered User
    Join Date
    11-07-2008
    Location
    Lincoln
    Posts
    17
    Awesome.

    Thanks for that. I feel slightly less stupid now.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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