Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Password for running Macro
I need to hide and unhide some columns using a macro and then prompt for a
password when unhiding. I used the protect worksheet function and set a password, and this worked fine. My user has now informed me that the protect worksheet will already be in use..... so now I just need to have a macro that hides some columns, but the unhide is prompted by a password. Is this possible without using the protect worksheet function? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Password for running Macro
cracked it; please ignore!
"Jim" wrote in message ... I need to hide and unhide some columns using a macro and then prompt for a password when unhiding. I used the protect worksheet function and set a password, and this worked fine. My user has now informed me that the protect worksheet will already be in use..... so now I just need to have a macro that hides some columns, but the unhide is prompted by a password. Is this possible without using the protect worksheet function? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Password for running Macro
Jim,
Your question is not completely clear; but maybe the code below will help you: yourPW= InputBox("password") ActiveSheet.Unprotect Password:=yourPW Columns("D:D").Select Selection.EntireColumn.Hidden = True Columns("D:D").Select Selection.EntireColumn.Hidden = True hope this helps. On Mar 9, 10:31*am, "Jim" wrote: I need to hide and unhide some columns using a macro and then prompt for a password when unhiding. I used the protect worksheet function and set a password, and this worked fine. My user has now informed me that the protect worksheet will already be in use..... so now I just need to have a macro that hides some columns, but the unhide is prompted by a password. Is this possible without using the protect worksheet function? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to allow auto filter after running password protect | Excel Discussion (Misc queries) | |||
Password for Running the Macro | Excel Discussion (Misc queries) | |||
How to see macro code of a password protected macro without a password? | Excel Programming | |||
Password Protect Running of Macro | Excel Programming | |||
running an password protected application | Excel Programming |