M
mlwallin
I need some VBA coding help.
I'm importing an Excel file into Access that has several sheets, and I want
to import the active sheet last updated. I'm using docmd.transferspreadsheet
in VBA and it imports the first sheet if I don't specify the specific sheet
in the range option. I can request that the user save the file and provide
the name of the sheet that needs to be imported, but I'd rather have it do
the following:
detect if the file is open, save it if required, and import the active sheet
only
- or -
if the file is not open, import the active sheet at the time the file was
saved and closed
But I don't know how to code all the above.
I'm importing an Excel file into Access that has several sheets, and I want
to import the active sheet last updated. I'm using docmd.transferspreadsheet
in VBA and it imports the first sheet if I don't specify the specific sheet
in the range option. I can request that the user save the file and provide
the name of the sheet that needs to be imported, but I'd rather have it do
the following:
detect if the file is open, save it if required, and import the active sheet
only
- or -
if the file is not open, import the active sheet at the time the file was
saved and closed
But I don't know how to code all the above.