ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programming Assistance (https://www.excelbanter.com/excel-programming/347663-programming-assistance.html)

Gsurfdude

Programming Assistance
 
Hello All:

I have an Access application that needs to import a "sheet" from a workbook.
In this work book, I have "Sheet1", "Sheet2", "Sheet3","Sheet4". In the
Access app, I use an input box to have the user enter the appropriate sheet
they want to import into Access. For instance, the user types in "Sheet3". In
code (Access VBA) how do I import this sheet (Sheet3). The Access code is

variable here is the input box result

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, variable,
strFileName, True

The intent is to import ONLY that sheet. The code above only imports Sheet1,
not the intended one.

Oh BTW, I have an open dialog box to allow the user to select the
appropriate Excel file.

Does this make sense ??

Thanks in AAdvance !

G Man


All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com