Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2006

Tip: Looking for answers? Try searching our database.

Allowing access to password protected spreadsheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DKerr - 12 Jun 2006 10:25 GMT
I have a main spreadsheet which is linked to 6 other password protecte
spreadsheets used by junior staff. I know the passwords but I woul
like one of the junior staff to be able to open and update thi
spreadsheet without knowing the passwords. Can this be done
Dave Peterson - 12 Jun 2006 12:52 GMT
You could give that person a macro that opens the other workbooks via code.
(The passwords would be in that VBA Code.)

But I don't see the difference--if they open the workbook using the macro, then
they'll be able to update the workbook as they like.

> I have a main spreadsheet which is linked to 6 other password protected
> spreadsheets used by junior staff. I know the passwords but I would
[quoted text clipped - 6 lines]
> DKerr's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=13087
> View this thread: http://www.excelforum.com/showthread.php?threadid=550927

Signature

Dave Peterson

DKerr - 12 Jun 2006 14:02 GMT
the individual isn't very knowledgeable on excel so I would be worrie
about them accessing the macro. Do you have an example
Dave Peterson - 12 Jun 2006 14:17 GMT
Option Explicit
Sub testme()

   Dim myFileNames As Variant
   Dim myPasswords As Variant
   Dim iCtr As Long
   Dim wkbk As Workbook
   
   myFileNames = Array("C:\my documents\excel\book11.xls", _
                       "C:\my documents\excel\book21.xls", _
                       "C:\my other folder\book11.xls")
                       
   myPasswords = Array("pwd1", _
                       "pwd2", _
                       "pwd3")
                   
   If UBound(myFileNames) <> UBound(myPasswords) Then
       MsgBox "check names & passwords--qty mismatch!"
       Exit Sub
   End If
   
   For iCtr = LBound(myFileNames) To UBound(myFileNames)
       Set wkbk = Nothing
       On Error Resume Next
       Set wkbk = Workbooks.Open(Filename:=myFileNames(iCtr), _
                                   Password:=myPasswords(iCtr))
       On Error GoTo 0
       
       If wkbk Is Nothing Then
           MsgBox "Check file: " & myFileNames(iCtr)
           Exit Sub
       End If
     
   Next iCtr
   
End Sub

> the individual isn't very knowledgeable on excel so I would be worried
> about them accessing the macro. Do you have an example?
[quoted text clipped - 4 lines]
> DKerr's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=13087
> View this thread: http://www.excelforum.com/showthread.php?threadid=550927

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.