I'm trying to automate an import from an excel worksheet and got to the following. You know when you use the import wizard for an excel workbook, that if you have more than one worksheet on your file it gives you the option to select which worksheet is the one you want to use. Cool. That is the exact logic I want, but in code. So far, I haven't seen anything that will allow me to select my worksheet. This is what I'm using for the import:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "MyTable", "myfile.xls", True
If myfile.xls has three worksheets what is going to happen. Is it the first worksheet that comes thru or what.X-) Let's say I only want worksheet 2 for my import. How do I do that.s-)
Thank you,
Z
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "MyTable", "myfile.xls", True
If myfile.xls has three worksheets what is going to happen. Is it the first worksheet that comes thru or what.X-) Let's say I only want worksheet 2 for my import. How do I do that.s-)
Thank you,
Z