Access Query only at the end

K

kilian

Hello,

I wrote a macro with Vba on Excel 2000.
My Excel's page updates its cells's values with a query on an access's
database. And my macro updates automatically this query and does any
operations with the values of the cells....

The problem is that the requery on the macro executes itself only at the
end of the script, but I wrote this instruction at the begining of the
script:

'''''''

Range("A1").Select
Selection.QueryTable.Refresh

'''''''

I don't know why this instruction executes only at the end of the
script... The macro execute operations on cells which are not updated...

Thanks....
 
K

kilian

Aaah it's ok.
I have to write:
Selection.QueryTable.Refresh BackgroundQuery:=False

Thanks...
 

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