+ Reply to Thread
Results 1 to 3 of 3

Can I password protect VBA modules using a macro?

  1. #1
    Don Wiss
    Guest

    Can I password protect VBA modules using a macro?

    Can I password protect VBA modules using a macro? I use a macro to prep
    the workbook for release. It would be nice if password protecting the
    modules could be part of this prepping routine.

    Don <www.donwiss.com> (e-mail link at home page bottom).

  2. #2
    Dave Peterson
    Guest

    Re: Can I password protect VBA modules using a macro?

    If you try, you'll have to rely on Sendkeys.

    Here's a Ron de Bruin post of a Bill Manville macro:
    http://google.co.uk/groups?threadm=u...TNGP09.phx.gbl

    I wouldn't rely on this.

    Don Wiss wrote:
    >
    > Can I password protect VBA modules using a macro? I use a macro to prep
    > the workbook for release. It would be nice if password protecting the
    > modules could be part of this prepping routine.
    >
    > Don <www.donwiss.com> (e-mail link at home page bottom).


    --

    Dave Peterson

  3. #3
    Don Wiss
    Guest

    Re: Can I password protect VBA modules using a macro?

    On Mon, 28 Mar 2005, Dave Peterson <[email protected]> wrote:

    >Don Wiss wrote:
    >>
    >> Can I password protect VBA modules using a macro? I use a macro to prep
    >> the workbook for release. It would be nice if password protecting the
    >> modules could be part of this prepping routine.


    >If you try, you'll have to rely on Sendkeys.
    >
    >Here's a Ron de Bruin post of a Bill Manville macro:
    >http://google.co.uk/groups?threadm=u...TNGP09.phx.gbl
    >
    >I wouldn't rely on this.


    Most useful. Thanks. I'm not looking to bury a password in the code. I plan
    to change it for each release. What I got out of the post was:

    Sub LockCode()
    SendKeys "+{TAB}{RIGHT}%V{+}{TAB}"
    ActiveWorkbook.VBProject.VBE.CommandBars(1).FindControl(ID:=2578, recursive:=True).Execute
    End Sub

    Don <www.donwiss.com> (e-mail link at home page bottom).

+ 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