Zeroanarchy
Technical User
Hi, Does anyone know if you can import data from an excel file based on the first sheet regardless of name.
For example I am using this as the current code
What I want to be able to do is, instead of the sheet name being" Raw Materials Prices" If the user of the xls changes the name I still want to be able to import it.
I tried leaveing the sheet name out but it doesn't work.
Any ideas??
Cheers
ZeroAnarchy
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.
For example I am using this as the current code
Code:
DoCmd.TransferSpreadsheet acImport, , "Raw Material Prices", "c:\filename.xls", True
What I want to be able to do is, instead of the sheet name being" Raw Materials Prices" If the user of the xls changes the name I still want to be able to import it.
I tried leaveing the sheet name out but it doesn't work.
Any ideas??
Cheers
![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.