LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default Prompt for password

Hi I have the following code and want to prompt the user for the correct
password. Can't seem to get it right. Can anyone help me?

Thanks in advance.

Tanya

Sub UnProtect_Workbook()
'Unprotect workbook
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In ActiveWorkbook.Worksheets
If ws.ProtectContents = True Then
ws.Unprotect ("BBHS")
End If
Next
ActiveWorkbook.Unprotect (["BBHS"])
Application.ScreenUpdating = True

End Sub
 
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
vba-password prompt on close kikde Excel Programming 3 November 15th 05 01:38 PM
Excel add-in password prompt and Act! Bob Flanagan Excel Programming 0 August 12th 05 09:03 PM
prompt for password only once Mike Boynton via OfficeKB.com Excel Programming 4 May 27th 05 01:34 PM
Password Prompt Noel Excel Discussion (Misc queries) 0 May 18th 05 07:42 PM
Password Prompt LuhElle Excel Discussion (Misc queries) 1 March 8th 05 11:11 PM


All times are GMT +1. The time now is 01:47 PM.

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

About Us

"It's about Microsoft Excel"