Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing specific cells from Excel 2k (single worksheet)

Status
Not open for further replies.

MarkWD

IS-IT--Management
Feb 2, 2003
1
US
I have 200+ excel workbooks that I need to import specific cells from a single worksheet per worksbook into a single record in Access resulting in a database of the selected data items.

acImport as I understand it imports a whole worksheet or a named range into a record. Is there any other way to accomplish this ?

Thanks in advance for any help!

 
If you look up in the help file for the GetObject function and copy the code from the example into a module, you will have the framework with which to work.

I played around with it by plugging in the following where it says ' Do manipulations of your file here.
Code:
  Value1 = MyXL.ActiveSheet.Range("B4").Value
  Value2 = MyXL.ActiveSheet.Range("C4").Value
  Value3 = MyXL.ActiveSheet.Range("D4").Value
  Output = Value1 & "," & Value2 & "," & Value3
  MsgBox Output
You should be able to set up a routine to process each of your files in a loop.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top