J
JP
Hello,
I normally program in Excel/Outlook but I need some Access help. I am
trying to import some spreadsheets into an Access database so I am
using "DoCmd.TransferSpreadsheet" but I need to check if the file is
already open. Does anyone know how to do this programmatically? I've
already tried googling on this but didn't find anything.
Here is the (Excel) code so far:
Sub ImportData()
Dim X As Access.Application
Set X = New Access.Application
X.OpenCurrentDatabase "filename"
X.DoCmd.TransferSpreadsheet acImport, , "myTable", "C:\filename.xls",
True
End Sub
How would I check if "filename" is already in use?
Thx all,
JP
I normally program in Excel/Outlook but I need some Access help. I am
trying to import some spreadsheets into an Access database so I am
using "DoCmd.TransferSpreadsheet" but I need to check if the file is
already open. Does anyone know how to do this programmatically? I've
already tried googling on this but didn't find anything.
Here is the (Excel) code so far:
Sub ImportData()
Dim X As Access.Application
Set X = New Access.Application
X.OpenCurrentDatabase "filename"
X.DoCmd.TransferSpreadsheet acImport, , "myTable", "C:\filename.xls",
True
End Sub
How would I check if "filename" is already in use?
Thx all,
JP