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

Excel VBA SQL connection

Status
Not open for further replies.

jag7777777

IS-IT--Management
Nov 25, 2012
3
GB
Hi Everyone,

Could somebody help me please with the code that I need to gain a connection with a SQL server? Assuming the following:

Server Name: Server
DB Name: DB
Login name: login
Password: password

Could someone please post what the procedure would look like in VBA so I could run a SELECT * FROM TABLE script.

Could you also please post how I could make this appear in a particular worksheet in a particular range within a workbook if I put this code in a standard module.

Thanks in advance,
 
Hi,

This ought to be posted in forum707.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top