Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to allow auto filter after running password protect Roady Excel Discussion (Misc queries) 1 July 17th 08 06:34 PM
Password for Running the Macro Naveen Excel Discussion (Misc queries) 3 July 13th 07 03:08 PM
How to see macro code of a password protected macro without a password? Dmitry Kopnichev Excel Programming 5 October 27th 05 09:57 AM
Password Protect Running of Macro John Excel Programming 8 September 27th 05 02:49 AM
running an password protected application arno Excel Programming 0 February 27th 04 07:26 AM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"