Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Everyone,
I've got an ODBC Query which is set to automatically refresh if the selection criteria cell (to which it is linked) changes. Is there a way to programatically detect that the refresh has occured? I need to update another cell after any refresh. Perhaps I need only to detect if the selection criteria cell contents has changed. If anyone can suggest either solution, that would be great. Regards Greg Glynn |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It's OK .. I figured it out.
1) Switch off automatic refresh in the Query 2) Detect a change in the Criteria Cell and then force a Refresh to the query table. Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Target.AddressLocal = "$F$11" Then ActiveSheet.Range("C103").QueryTable.Refresh End If End Sub 3) Do whatever Thanks anyway People. Greg Glynn wrote: Hi Everyone, I've got an ODBC Query which is set to automatically refresh if the selection criteria cell (to which it is linked) changes. Is there a way to programatically detect that the refresh has occured? I need to update another cell after any refresh. Perhaps I need only to detect if the selection criteria cell contents has changed. If anyone can suggest either solution, that would be great. Regards Greg Glynn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2000: An Error Occured Initializing the VBA Libraries (2) | Excel Discussion (Misc queries) | |||
Refresh MSQuery w/ Access datasource issue | Excel Discussion (Misc queries) | |||
Unexpected error occured. - MS Excel | Excel Discussion (Misc queries) | |||
MsQuery Refresh Message | Excel Programming | |||
Wait until MSQuery Refresh finished | Excel Programming |