ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I password protect VBA modules using a macro? (https://www.excelbanter.com/excel-programming/326315-can-i-password-protect-vba-modules-using-macro.html)

Don Wiss

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).

Dave Peterson[_5_]

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...GP09.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

Don Wiss

Can I password protect VBA modules using a macro?
 
On Mon, 28 Mar 2005, Dave Peterson 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...GP09.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).FindCo ntrol(ID:=2578, recursive:=True).Execute
End Sub

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


All times are GMT +1. The time now is 04:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com