MedievalMan
Board Regular
- Joined
- Dec 14, 2004
- Messages
- 57
Hi,
I am using a MS query in my Excel file, which I can refresh in code with:
<code>
Worksheets("Cycles"). Range("B4").QueryTable.Refresh BackgroundQuery:=False
</code>
What I would like to do is as follows:
If the Query successfully refreshses, copy these values to another location.
Right now, the cells just reference the query cells, but this can cause errors if the Query does not successfully refresh (database is down, user doesn't have environmental parameters setup correctly, etc)
Thanks in advance.
Matt Lawson
I am using a MS query in my Excel file, which I can refresh in code with:
<code>
Worksheets("Cycles"). Range("B4").QueryTable.Refresh BackgroundQuery:=False
</code>
What I would like to do is as follows:
If the Query successfully refreshses, copy these values to another location.
Right now, the cells just reference the query cells, but this can cause errors if the Query does not successfully refresh (database is down, user doesn't have environmental parameters setup correctly, etc)
Thanks in advance.
Matt Lawson