I am working on windows 10, Excel 2016.
The file i was creating is to be a shared file, which will have data input by numerous peope with the data then being transferred into anothe file for another department to review.
The code written closed the 2nd file when the data was transferred, and i found the following code which worked to wait until any previous action was complete before adding the next set of data
Do
Application.Wait Now+ TimeSerial(0, 0, 1)
Set wb =Workbooks.Open(Filename:="S:\ULR\Projects\Projects\Cheque Requests\Requestlog.xlsm")
If wb.ReadOnly Then
Loop Until Notwb.ReadOnly
Then rest of code
The problem i am now having is the 2nd file now needs to be password protected, and when trying to add the standard "Password:="Password"" to the open file command i get the folowing
Compile error: Expected: end of statement, or Compile Error: Syntax Error
I am at a loss on how to get this to work as it worked perfectly fine before the introdution of a password
Any assistance would be greatly appreciated
The file i was creating is to be a shared file, which will have data input by numerous peope with the data then being transferred into anothe file for another department to review.
The code written closed the 2nd file when the data was transferred, and i found the following code which worked to wait until any previous action was complete before adding the next set of data
Do
Application.Wait Now+ TimeSerial(0, 0, 1)
Set wb =Workbooks.Open(Filename:="S:\ULR\Projects\Projects\Cheque Requests\Requestlog.xlsm")
If wb.ReadOnly Then
Loop Until Notwb.ReadOnly
Then rest of code
The problem i am now having is the 2nd file now needs to be password protected, and when trying to add the standard "Password:="Password"" to the open file command i get the folowing
Compile error: Expected: end of statement, or Compile Error: Syntax Error
I am at a loss on how to get this to work as it worked perfectly fine before the introdution of a password
Any assistance would be greatly appreciated