on 10-26-2005 6:59 PM
Gurus,
I am trying to find out if there is any VBA code that will trigger a query refresh (similar to setting the query properties to refresh query when opening workbook). The problem is that we don't have a web portal and I want to allow my customers to run queries stored in Excel workbooks on our web site. One query isn't a problem, but in workbooks with multiple queries on separate tabs I would prefer to have a single macro that will automate the refresh for all queries in the workbook. Any suggestions would be greatly appreciated.
Thanks in advance,
Reid
Hi Reid,
Use the following in Excel VBA ...
To refresh ALL queries in the active workbook:
Run "SAPBEX.XLA!SAPBEXrefresh", True
To refresh a single query, either:
(a) be sure that active cell is part of the query (a filter cell, a text element, or part of the query results table), and use:
Run "SAPBEX.XLA!SAPBEXrefresh", False
(b) refer to a cell that is part of the query by using:
Run "SAPBEX.XLA!SAPBEXrefresh", False, Range("??")
where ?? = cell address.
- Pete
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.