Hi, currently, I am using Excel 2000. I would like to do the below in VBA. I
am new in SQL Programming in VBA. To help you to understand myself better, I
have been programming in VBA for Excel quite sometimes. But for the below, I
am totally new.
Pls help me. It is urgent.
01) Check that a local pc connected to an SQL Server (This server is located
in my
office) successfully.
02) Connect to the SQL Server.
03) Open the database.
04) Open a table in this database.
05) Extract this table.
06) Copy all extracted records and paste in one worksheet in my Excel File.
07) Close the table.
08) Close the database.
09) Close the connection.
You may reply to my below email addresses.
01)
02)
Thanks and Best Regards
Sandra Poh
Have you tried using MSQuery for this task?.....it seems right down it's alley.
Data gt; GetExternalData gt; CreateNewQuery.........
Vaya con Dios,
Chuck, CABGx3
quot;Sandra Pohquot; wrote:
gt; Hi, currently, I am using Excel 2000. I would like to do the below in VBA. I
gt; am new in SQL Programming in VBA. To help you to understand myself better, I
gt; have been programming in VBA for Excel quite sometimes. But for the below, I
gt; am totally new.
gt; Pls help me. It is urgent.
gt;
gt; 01) Check that a local pc connected to an SQL Server (This server is located
gt; in my
gt; office) successfully.
gt; 02) Connect to the SQL Server.
gt; 03) Open the database.
gt; 04) Open a table in this database.
gt; 05) Extract this table.
gt; 06) Copy all extracted records and paste in one worksheet in my Excel File.
gt; 07) Close the table.
gt; 08) Close the database.
gt; 09) Close the connection.
gt;
gt; You may reply to my below email addresses.
gt;
gt; 01)
gt; 02)
gt;
gt; Thanks and Best Regards
gt; Sandra Poh
- Jul 16 Mon 2007 20:38
Sample Codes for SQL for Excel VBA
close
全站熱搜
留言列表
發表留言