csilabgirl
Active Member
- Joined
- Aug 14, 2009
- Messages
- 359
excel 2002
I have a workbook set up (called Client List) with a password to modify, so that when the user opens it, they can either enter a password to get write access or they can just click read only.
Then I have another workbook with a private sub workbook_open event which opens the "Client List" workbook. Because of the password to modify setting, it asks the user if they want to enter the password or choose read only. When the "Client List" workbook is opened through the other workbook , I always want it to open as read only and not ask the user.
Is there something I can add to my code that will do this for them so they dont always have to click the button? Below is my code
Private Sub Workbook_Open()
Dim wbOpen As Workbook
Set wbOpen = Workbooks.Open(FileName:="\\Server\Chromosomal Labs\ChromoLIMS\Client List.xls")
wbOpen.Sheets("Clients").Columns("A:CZ").Copy
ThisWorkbook.Sheets("CL Paste").Columns("A:CZ").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
wbOpen.Close
Thank you for your help!
I have a workbook set up (called Client List) with a password to modify, so that when the user opens it, they can either enter a password to get write access or they can just click read only.
Then I have another workbook with a private sub workbook_open event which opens the "Client List" workbook. Because of the password to modify setting, it asks the user if they want to enter the password or choose read only. When the "Client List" workbook is opened through the other workbook , I always want it to open as read only and not ask the user.
Is there something I can add to my code that will do this for them so they dont always have to click the button? Below is my code
Private Sub Workbook_Open()
Dim wbOpen As Workbook
Set wbOpen = Workbooks.Open(FileName:="\\Server\Chromosomal Labs\ChromoLIMS\Client List.xls")
wbOpen.Sheets("Clients").Columns("A:CZ").Copy
ThisWorkbook.Sheets("CL Paste").Columns("A:CZ").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
wbOpen.Close
Thank you for your help!