UMAKEMESIK
Active Member
- Joined
- Oct 3, 2005
- Messages
- 378
Hello
I use this code to open workbook 2 from workbook1
Can I insert some code to first check to see if the workbook protective packaging order log.xlsm is open already with a password or read only.
if the workbook is open with read only we would like to proceed with the code and moving data from wb1 to wb2
if the sheet is opened with a password.
can we get a msg box back that says the wb2 is in use
and the code will end.
any help would be appreciated.
I use this code to open workbook 2 from workbook1
Code:
Dim LastRow As Range
Dim ws As Worksheet
Set ws = Sheets("Worksheet")
Workbooks.Open Filename:="R:\General\COVER SHEET_Protective\Protective Packaging Order Log.xlsm", Password:="PP", WriteResPassword:="PP"
Can I insert some code to first check to see if the workbook protective packaging order log.xlsm is open already with a password or read only.
if the workbook is open with read only we would like to proceed with the code and moving data from wb1 to wb2
if the sheet is opened with a password.
can we get a msg box back that says the wb2 is in use
and the code will end.
any help would be appreciated.