PearlGI
Registered User.
- Local time
- Today, 15:59
- Joined
- Aug 30, 2001
- Messages
- 125
I have a database that manipulates data in an Excel workbook. Everything works okay, unless Excel is 'busy', for instance if a user has left up an open file dialog window and then everything hangs.
Is it possible to identify if objExcel is 'busy' so that the user can be asked to rectify the problem so that the database can perform its tasks?
If anybody wants to see what happens, try the running the following code from Access whilst an Open File dialog box is open in Excel.
ps. You need to make sure than the Microsoft Excel Object Library is referenced for this code to run.
Is it possible to identify if objExcel is 'busy' so that the user can be asked to rectify the problem so that the database can perform its tasks?
If anybody wants to see what happens, try the running the following code from Access whilst an Open File dialog box is open in Excel.
Code:
Sub TestXL()
Dim objExcel As Excel.Application, _
wb As Workbook
Set objExcel = GetObject(, "Excel.Application")
Set wb = objExcel.Workbooks.Add
End Sub
ps. You need to make sure than the Microsoft Excel Object Library is referenced for this code to run.