PDA

View Full Version : [SOLVED:] Monitoring Remote Workbook for Changes



arrow3
08-25-2017, 07:50 PM
Hi. I am developing a VBA application which will utilize a USB card swipe for employee sign-ins in a remote computer. I have the card swipe working and saving the employee's card # into a worksheet in a workbook on our network. My main program is running on another computer and I would like to monitor the remote Excel file for changes every time a card has swiped.

My only thought was to open the remote workbook and create a public withEvents variable so that I can use Worksheet_Change, however this will not work as the remote workbook has to be opened read only and once it's open it obviously only shows the content at the time it was opened.

I would really appreciate any suggestions as to how this can be done.

Thank you!

mdmackillop
08-26-2017, 01:41 AM
Why not have the remote workbook append the changed information to a csv file which you can read to obtain latest changes. It could also be saved with a timestamp if preferred.

arrow3
08-26-2017, 07:30 PM
Thank youmdmackillop. That was a good idea. I did that and it's working out perfectly using application.onTime to check for new changes since the previous time. Thanks again.