L
Legacy 221039
Guest
Hi
Please consider the following Excel macro:
Then suppose an Access file contains only only table which looks like this:
id name age
1 Bob 40
2 Bobby 41
3 Robert 42
How would I run the "Experiment1" macro from within Access, and then use the result of the macro in a select query that showed me only the "Bob" line (i.e. only showed me rows that where the person's age was equal to the result of the macro)?
The actual problem could be solved easily with Access of course, but my interest is in the interaction between Excel and Access.
Thanks in advance
Mark
Please consider the following Excel macro:
Code:
Sub Experiment1()
Dim x as integer
x=40
End sub
Then suppose an Access file contains only only table which looks like this:
id name age
1 Bob 40
2 Bobby 41
3 Robert 42
How would I run the "Experiment1" macro from within Access, and then use the result of the macro in a select query that showed me only the "Bob" line (i.e. only showed me rows that where the person's age was equal to the result of the macro)?
The actual problem could be solved easily with Access of course, but my interest is in the interaction between Excel and Access.
Thanks in advance
Mark