Results 1 to 7 of 7
  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Hide or lock a specific module (2K3)

    I have created a module that I will be using in a lesson I am devising. This module has specific functions that I do not particularly want my students to look at.

    What I plan to do is have this module stored on a file share area in the form of a bas file and then have the students import it into a fresh workbook. I thought I would do this so that in case they mess up they can download a fresh bas file.

    That is the reason now the question, how can I protect this bas file , either from them opening it or can I hide it some how <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Jerry

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hide or lock a specific module (2K3)

    A .bas file is just a text file, I don't think there is anything you can do to protect it if you still want students to be able to import it.
    Instead, you could place the module in a workbook, lock the VBA project for viewing (Tools | Project Properties in the Visual Basic Editor) and save the workbook as an add-in (.xla).
    The students could then install the add-in. They would be able to use the functions, but not to look at the code.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hide or lock a specific module (2K3)

    Are yes an add-in, excellent idea.....

    Right while I have you attention, whilst waiting for a reply I had added a button from my forms toolbar and assigned a function to it. It is a miserable little critter as I would like to depress inwards when I click it, this one just stays flat...have I missed the point. macro works fine just the button looks flat <img src=/S/sad.gif border=0 alt=sad width=15 height=15>
    Jerry

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hide or lock a specific module (2K3)

    The command button from the Forms toolbar doesn't give any visual feedback.
    If you want a button that looks depressed when clicked, use the command button from the Control Toolbox.
    If you want a button that stays depressed until clicked again, use the toogle button from the Control Toolbox.

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hide or lock a specific module (2K3)

    <img src=/S/blush.gif border=0 alt=blush width=15 height=15> Thanks
    Jerry

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hide or lock a specific module (2K3)

    If you're feeling depressed, watch the spam you receive - before long, there'll be a nice offer for cheap pills. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  7. #7
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hide or lock a specific module (2K3)

    <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>

    I was waiting for that one liner, I was desperately trying to find an alternative description.

    Anyway, thanks for the idea for the add-in, I have just tested it and it is absolutely perfect for the job <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Jerry

Posting Permissions

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