I'm using the Docmd.Transferspreadsheet method to import data from a spreadsheet which contains several worksheets.
To select the worksheet to import, I have included the worksheet name as the final parameter of the DoCmd.Transferspreadsheet method. The only way I can get the code to work is to include a cell range with the worksheet name eg "Compliance!A1:z1000" but as I have absolutely no idea how much data will be present when the program is up and running, I need to import the entire spreadsheet and not specify a range.
Can anyone help me with this?
To select the worksheet to import, I have included the worksheet name as the final parameter of the DoCmd.Transferspreadsheet method. The only way I can get the code to work is to include a cell range with the worksheet name eg "Compliance!A1:z1000" but as I have absolutely no idea how much data will be present when the program is up and running, I need to import the entire spreadsheet and not specify a range.
Can anyone help me with this?