Unhide Columns With A Password
It is possible with an inputbox.
Sub unhide()
pword = InputBox("enter the password")
If pword < "mypass" Then
MsgBox "incorrect password"
Exit Sub
Else
ActiveSheet.Range("A:A,C:C,D:D").EntireColumn.Hidd en = False
End If
End Sub
BUT...........without protecting the sheet, placing a password on a macro
would prove to be sort of useless.
Users could unhide the columns without using your macro.
Protect the sheet with columns hidden and a password to unprotect.
Users will have to know the password.
Also be warned that Excel's internal passwords are eaty to crack.
Gord Dibben MS Excel MVP
On Wed, 3 Mar 2010 15:44:34 -0000, "Jim" wrote:
I am trying to create a small marco that unhides a few columns in excel, but
prompts for a password. Is this possible?
Thanks
|