VBA in Reflexion (WRQ)

A

Alexandre Saillant

hello,

I am trying to find a VBA routine that will launch an Access program
from a VBA macro in reflexion 10.0

I tryed the direction from WRQ VBA manual (available in there site -
http://support.wrq.com/assets/vbug.pdf) but its does not work 100%. I
can do "createobject" for an word application but for some reason I
cannot do it for excel or access. Worst, I cannot Getobject anything.
Even when I just copy and paste one of there damn example.

This is what I am trying to do:

I open a macro in reflexion. It's a continious loop. It download
some data and save it to 3 text files. Then, I need to load access
and I have another macro that crunch the numbers so they become
readable. (note, reflexion needs to wait for access to stop before it
resume it's downloading).

This is what WRQ says I should do:

Dim AccObject as access.application
set AccObject = getobject("c:\db1.mdb")
accObject.visible = true


Looks so simple but simply does not work!

Help Please!

Alexandre Saillant
 
J

Jonathan West

Hi Alexandre,

you ahve to decide whether you are using early binding or late binding. Your
code is currently a mixture.

If you are using early binding, then your code won't work iunless you go to
Tools References in the VBA editor and set a reference to the Access 10.0
object library.

If you are using late binding, your should Dim AccessObject As Object, not
as Access.Application.

I suggest you do a search of the msdn.microsoft.com website for the terms
"Early Binding" and "Late Binding" in order to get more information on this
issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top