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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with TransferSpreadSheet method

Status
Not open for further replies.

janelange

Technical User
Jun 12, 2003
45
US
Hi all

I want to automatically update a database with the contents of excel spreadsheets. My spreadsheets consist of workbooks, each with several worksheets containing formatted data.

I am attempting to write the code for this in Visual Basic via the visual developer's studio environment.

I know I need to use the Transfer Spreadsheet method, but am having some trouble getting the syntax right.

Also, is there anyway I can specify which worksheet I want to import?

I am pretty new at this, so any help would be appreciated:)

Jane


 
Hi jane,

This is really the Visual Basic for Application Forum.. You have asked a VB question. You might want to post this question in the VB 5 & 6 Forum

VB 6.0 help states, among other things...

Note Although you can use the TransferSpreadsheet method in Visual Basic to link to spreadsheet data, it's recommended that you use Data Access Objects (DAO) instead. To create a link by using DAO, use the Connect property for the TableDef object.

It seems that the TransferSpreadsheet Method is primarily used for Excel 97 or earlier or early Lotus 123 versions.

I would recommend that you use ADO or DAO. :)

Skip,
Skip@TheOfficeExperts.com
 
Thanks for the speedy reply. I will look into this...

Jane

 
You were absolutely right!!!!

Got things to work with DAO...

Jane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top