![]() |
password for macro
Hello,
it is possible to crate a password to run macro mean when i click command button to run a macro to ask password for run which restricted other person to use macro |
password for macro
Well, just use a simple InputBox, and don't forget to hide/protect your
VBA-code. Be aware, however, that any determined intermediate user with no problem can crack any Excel-code within 5 minutes... CE Den 09.02.2012 17:55, kalpesh skrev: Hello, it is possible to crate a password to run macro mean when i click command button to run a macro to ask password for run which restricted other person to use macro |
password for macro
Sub test()
pword = InputBox("Enter the password") If pword < "drowssap" Then GoTo oops MsgBox "you got it right" 'your code goes here Exit Sub oops: MsgBox "try again" End Sub Make sure you add VBA protection so's users cannot see code. In the VBE right-click on the workbook/project and PropertiesProtectionLock for Viewing and password it with some other password..........DO NOT forget it. Save, close and re-open before locking takes place. Gord On Thu, 09 Feb 2012 10:55:23 -0600, kalpesh wrote: Hello, it is possible to crate a password to run macro mean when i click command button to run a macro to ask password for run which restricted other person to use macro |
password for macro
Charlotte E. submitted this idea :
Be aware, however, that any determined intermediate user with no problem can crack any Excel-code within 5 minutes... Actually, it takes less than 1 minute to clear a file of all passwords, including open password, wkb/wks protection, and VBA project. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
All times are GMT +1. The time now is 10:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com