Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello.
I'm trying to figure out exactly how to use VBA to look at the contents of a cell, then query a SQL server using that data and return results to several other cells. My server name is Goober and the table I want to pull the data from is Jeff. In ODBC, I have the Server connection called Testing basically I need to look at the contents of cell A1, and then run a statement that does the following: Output to cell A2 the results of the SQL query select CreatedDate from Goober..Jeff where InvoiceNumber = (Cell A1) Output to cell A3 the results of the SQL query select CreatedByUser from Goober..Jeff where InvoiceNumber = (Cell A1) I'm well versed in SQL, but I am a VBA novice, so I don't know how to set up my connections (with VBA code) or what the difference is between ADO and DAO, so could you please include that in your answer? Also, I'd need to know if I need to set any References. Thanks! Ken |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pull cell contents from one wksh to another if condition is met | Excel Worksheet Functions | |||
Reference Data Range based on cell contents | Charts and Charting in Excel | |||
I cannot select a single cell or pull down cell contents | Excel Worksheet Functions | |||
? how to pull data from another sheet based on value | Excel Programming | |||
Data searching based on cell contents using VBa | Excel Programming |