Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vj Vj is offline
external usenet poster
 
Posts: 54
Default Unprotect a Excel workbook using vba macro

Is there any way, I can unprotect a excel workbook using vba macro.

Thanx
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Unprotect a Excel workbook using vba macro

Activeworkbook.unprotect "MyPassword"

HTH

"VJ" wrote:

Is there any way, I can unprotect a excel workbook using vba macro.

Thanx

  #3   Report Post  
Posted to microsoft.public.excel.programming
Vj Vj is offline
external usenet poster
 
Posts: 54
Default Unprotect a Excel workbook using vba macro

Hi Jim,

I am sorry, It is about locking and unlocking a workbook using vba macro.

Thanks for ur help

"Jim Thomlinson" wrote:

Activeworkbook.unprotect "MyPassword"

HTH

"VJ" wrote:

Is there any way, I can unprotect a excel workbook using vba macro.

Thanx

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Unprotect a Excel workbook using vba macro

'If document is protected, Unprotect it.
If ActiveDocument.ProtectionType < wdNoProtection Then
ActiveDocument.Unprotect Password:=""
End If

'ReProtect the document.
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
End If

One unprotects then one protects

"VJ" wrote:

Is there any way, I can unprotect a excel workbook using vba macro.

Thanx

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
Cannot unprotect workbook with an Excel crash westcoastgills Excel Discussion (Misc queries) 0 October 29th 08 02:50 PM
Unprotect workbook/worksheet Excel 2007 Steve Excel Discussion (Misc queries) 0 September 17th 08 02:04 AM
I've forgotten the password to unprotect a workbook in Excel. Punkoloratura Excel Worksheet Functions 3 September 3rd 08 08:48 PM
How to unprotect a workbook by macro? FARAZ QURESHI Excel Discussion (Misc queries) 4 December 29th 06 12:27 AM
Macro to unprotect workbook Mike[_65_] Excel Programming 8 February 11th 04 05:16 PM


All times are GMT +1. The time now is 03:22 AM.

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"