ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Access query from Excel (https://www.excelbanter.com/excel-programming/324827-access-query-excel.html)

mas

Access query from Excel
 
I am trying to write a query and accesss database. I can query the database
and
return a value to cell on a work sheet, but I would like the value assigned
to variable instead. Can that be done without placing the value on a
worksheet? I use the value in a formula.

Thanks





Jake Marx[_3_]

Access query from Excel
 
Hi mas,

mas wrote:
I am trying to write a query and accesss database. I can query the
database and
return a value to cell on a work sheet, but I would like the value
assigned to variable instead. Can that be done without placing the
value on a worksheet? I use the value in a formula.


Yes, but it will involve some VBA programming. You could hit the db with
ADO, get the value you need, and store that value in a variable. You can do
a google search or MSDN search on ADO to find tons of examples of how to do
it.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]



All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com