View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gsurfdude Gsurfdude is offline
external usenet poster
 
Posts: 5
Default 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