Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ew ew is offline
external usenet poster
 
Posts: 27
Default Unprotecting Question

I have a file that is first shared and secondly each sheet is shared. What
I'm running into is the part of the code that makes the file unshared. This
is the code so far. Thanks for any help in advance....

ub Unprotect_All()

Dim fileToOpen As Variant
Dim ws As Worksheet
Dim Wbk As Workbook


fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls")

Application.ScreenUpdating = False
ActiveWorkbook.ExclusiveAccess
For Each ws In Worksheets
ws.Unprotect
Next ws
Application.KeepChangeHistory = True
Application.SaveAs _
AccessMode:=xlShared
Application.ScreenUpdating = True

End Sub
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
modify without unprotecting the sheet, Unsolved question filo666 Excel Programming 1 November 23rd 05 05:06 PM
unprotecting a worksheet Randy123 Excel Discussion (Misc queries) 1 August 8th 05 06:11 PM
Unprotecting! Joseph Excel Programming 1 August 3rd 04 02:18 PM
Unprotecting! Joseph Excel Programming 1 August 2nd 04 04:18 PM
Unprotecting! Joseph Excel Programming 1 August 2nd 04 03:13 PM


All times are GMT +1. The time now is 09:43 AM.

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"