running a Database Query

  • Thread starter Thread starter Tom S
  • Start date Start date
T

Tom S

XP Home
Excel 2002

How can I force a Database Query, that's already been written, to run when
specified using VBA?

Tom S.
 
-----Original Message-----
XP Home
Excel 2002

How can I force a Database Query, that's already been written, to run when
specified using VBA?

Tom S.


.

Look in Excel VBA Help under QueryTables Collection - the
basic form is:
Sheets("SheetName").QueryTables("TableName").Refresh
Where SheetName is the name of the worksheet containing
the query results and TableName is the name of the Query
Table Range (i.e., what you see when you look at the Query
Properties).
 

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

Back
Top