VBA

  • Thread starter Thread starter Desperate
  • Start date Start date
D

Desperate

I have a spreadsheet that has an "Update" command button
on it. When clicked, I want to go out,(using ADO )or ODBC
if I have to) to a database on a server, retrieve
the "Parts" table from this db, and then create a new
spreadsheet at C:\temp (or copy over/update this
spreadsheet 'PartMaster.xls' if it already exists)
I need this to all happen behind the scenes with VBA- not
manually by a user.
Can anyone PLEASE give me some help on how to do this??
Any code samples would be GREATLY appreciated!!
TIA,
Joey
 
Some sample code from Erlandsen Data Consulting :

http://www.erlandsendata.no/english/index.php?t=envbadac

Some articles from Microsoft :

HOWTO: Use ADO with Excel Data from Visual Basic or VBA
http://support.microsoft.com/default.aspx?scid=kb;en-us;257819&Product=xlw

HOWTO: Transfer Data from ADO Data Source to Excel with ADO
http://support.microsoft.com/default.aspx?scid=kb;EN-US;295646


HOWTO: Transfer Data from ADO Recordset to Excel with Automation
http://support.microsoft.com/default.aspx?scid=kb;EN-US;246335

INFO: Methods for Transferring Data to Excel from Visual Basic
http://support.microsoft.com/default.aspx?scid=kb;EN-US;247412

SAMPLE: ExcelADO Demonstrates How to Use ADO to Read and Write Data in
Excel Workbooks
http://support.microsoft.com/default.aspx?scid=kb;EN-US;278973

HTH
Paul
 
Back
Top