#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default VBA

Some sample code from Erlandsen Data Consulting :

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

Some articles from Microsoft :

HOWTO: Use ADO with Excel Data from Visual Basic or VBA
http://support.microsoft.com/default...19&Product=xlw

HOWTO: Transfer Data from ADO Data Source to Excel with ADO
http://support.microsoft.com/default...b;EN-US;295646


HOWTO: Transfer Data from ADO Recordset to Excel with Automation
http://support.microsoft.com/default...b;EN-US;246335

INFO: Methods for Transferring Data to Excel from Visual Basic
http://support.microsoft.com/default...b;EN-US;247412

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

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"