Brad Marks
BradM at blackforestltd.com
Fri Feb 8 16:32:05 CST 2013
Rocky, Thanks for the idea. I had not thought of this approach. I did some testing and it looks like this method will work. I appreciate the help. Thanks again! Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin Sent: Friday, February 08, 2013 4:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Access Application Obtaining Data from Excel -AnotherUser Has Excel File Opened Don't know how to trap that but as a work-around in the module that processes the sheet, could you make a copy and open the copy? Then delete it when you're done. Rocky Smolin Beach Access Software 858-259-4334 www.bchacc.com www.e-z-mrp.com Skype: rocky.smolin -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks Sent: Friday, February 08, 2013 1:27 PM To: Access Developers discussion and problem solving Subject: [AccessD] Access Application Obtaining Data from Excel - AnotherUser Has Excel File Opened All, I am struggling with a small Access 2007 application that obtains data from an Excel file. The Excel file is defined as a Linked Table in Access. There is a single query which is used via Record Set processing. The data is returned perfectly when no one else is using the Excel file. If another user is looking at the Excel file but has not clicked on any cells, the data is returned to Access properly. However, if another user has the Excel file opened and has clicked on a cell, the Access application runs into a problem. The Access VBA code that does the Record Set processing has error handling code, but the error that is returned is not trapped by the error handling code. Instead a message is shown that says "This action cannot be completed because the Microsoft Excel - (the Excel file name) is busy. I would like to either be able to catch this error with the normal error handling code Or Invoke some sort of routine to determine if the Excel file is tied up before trying to obtain the data via Access. Any ideas? Thanks, Brad -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.