Excel Multiple Worksheets - TransferSpreadsheet VBA

L

learning_codes

Hi,

I'm having a trouble transferring the data from EXCEL to Access.


The spreadsheet contains three worksheets. One of 3 worksheets show blank data. I was successful transfer the data to Access from Excel only two worksheets but not 3rd Worksheet. 3rd Worksheet show blank data.

How do I ignore 3rd worksheet.

'Worksheet #1:
DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel12, "Access Table" "C:\Path\File Name.xlsx", True, "Active$"


'Worksheet #2:
DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel12, "Access Table 2", "C:\Path\File Name.xlsx", True, "Closed$"


'Worksheet #3:
DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel12, "Access Table 3", "C:\Path\File Name.xlsx", True, "Inactive$"


Is there a way to find Worksheet #3 that has blank data?

Thanks..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top