ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Access form to assign values of variables in an Excel VBAprogram (https://www.excelbanter.com/excel-programming/441525-using-access-form-assign-values-variables-excel-vbaprogram.html)

rjagathe

Using Access form to assign values of variables in an Excel VBAprogram
 
I have created a VBA program for Ms Excel.But,to get desired results,
every time, I go into the code to change the values of variables.Is
there a way to get the values of variables stored in an Access table?

joel[_875_]

Using Access form to assign values of variables in an Excel VBAprogram
 

YOu need to do a search for ADO method (ActiveX Data Object). There
are plenty of example of code on the web. You need to add two
references in your VBA to use the method.

from VBA menu tools - References


1) Microsoft Access XX.X object library
2) Microsfot ActiveX Data Objects X.X library

Use the latest versio of the two libraries on your PC.

You will make a connection to the Access file and then Open a
recordset. You can either use SQL to filter the recordset or scroll
through the record set from first entry to last entry.


There is very little differences between and Access table and an Excel
shreadsheet. they both have the same file structure like all Microsoft
Office products and the only difference is the Tool you use to open the
file (Access or Excel).


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=194580

http://www.thecodecage.com/forumz



All times are GMT +1. The time now is 04:37 AM.

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