Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default unprotect when file is shared

Hi, I have the below code but when I share workbook it does't work.. any help
pls

Sub UnP()
Dim wks As Worksheet
Dim strPassword

strPassword = InputBox("Enter the password", "Password")

ActiveSheet.Unprotect Password:=strPassword
Range("A4:I1000").Select
Selection.Locked = False
ActiveSheet.Protect contents:=False
ActiveSheet.Protect Password:=ActiveSheet.Range("P1").Value
Application.Goto Reference:="R4C1"
Selection.End(xlDown).Select

On Error GoTo 0

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default unprotect when file is shared


First thing that comes to mind for me is version problems. I don't know
why, but when I try this in Excel2007 I get the error "Method 'Goto' of
object '_Application' failed". Why it has the underscore is a mystery to
me, I can only guess that it has something to do with the (most likely
C++) code that drives Excel. Possibly someone changed the method or
something before releasing 2007 version, but I'm not at all sure. That's
just my thoughts...


--
gmorris
------------------------------------------------------------------------
gmorris's Profile: http://www.thecodecage.com/forumz/member.php?userid=245
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=87977

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
Unprotect a Shared Workbook - Option is Greyed Out DOUG Excel Discussion (Misc queries) 1 March 18th 10 06:58 PM
I cant unprotect my shared document?? sillyshyme Excel Worksheet Functions 2 September 19th 09 03:53 AM
Unprotect shared worksheet Stefi Excel Programming 2 January 20th 06 10:01 AM
Can I unprotect / protect a shared workbook? Florence Excel Programming 8 August 17th 05 04:08 PM


All times are GMT +1. The time now is 01:16 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"