The below code was written to work for excel 2007 version and works well but when executed on the 2010 version, only part of the code gets executed properly.
This is what the code does: if BOOK1.xlsm is being used by another user on a network then the code will open BOOK1.xlsm as readonly and simultaneously write the password abc123, if no one is using the workbook, then the workbook is available to be edited and the code will open BOOK1.xlsm as read-write and again simultaneously write the same password as above.
I tried using this code for the excel 2010 version but when the code tries to open the workbook in readonly format the password prompt message (which the code is supposed to automatically write the password) pops up.
The part of the code that doesn't execute properly is in red font.
Any help on this issue would be greatly appreciated.
Thanks in advance.