View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ChadF ChadF is offline
external usenet poster
 
Posts: 44
Default VBA Function to talk to MS Access

I'm new to VBA programming, would appreciate some advice,

I have an Excel spreadsheet that needs a pulldown menu based on a SQL query
statement.

Would like to define a cell (or a named range) like this :
=(MyQueryTable(Worksheet1!$A$3))

where MyQueryTable is my new VBA function that does a very simple SQL query
call to a MS Access mdb file in the same directory as the excel sheet.

so, the SQL statement is something like this
"SELECT Position FROM PositionRate WHERE CompanyID = " & InputParameter & ";"

InputParameter is what i feed into this function (Worksheet!$A$3)

How would I do this ?

Appreciate your help.
Chad