![]() |
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 |
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 |
All times are GMT +1. The time now is 07:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com