Hi all,
I have two excel sheet. one contains live data and another contains archive data.
after completing data entry for every row I move the row contents from excel 1 to excel 2. since both the excel workbooks are used by many people, I have protected them password.
During moving the data, the macro automatically unprotectes both the excel workbooks and moves the row content to excel 2 and protects again saves. excel 2 is opened through macro and closed with VBA code written in excel 1.
Problem: when the excel 2 is opened "read only"/ normaly by somebody, and some one else tries to move the row content to excel 2, it tries to open the read only file again and moves the data to new read only file. due to this the data is lost.
solution needed: I want to know the VBA code to check if the excel 2 is already opened by somebody as read only and if opened, quit the program with a message "excel 2 is already opened, try later after closing excel 2", and if excel 2 is not opened, continue with row content movement from excel 1 to excel 2.
could somebody help with VBA code ?
code used in excel 1:
Regards, sathyaganapathi![]()
Please Login or Register to view this content.
Bookmarks