+ Reply to Thread
Results 1 to 2 of 2

Thread: Excel/MSQuery - Detect when Refresh has occured

  1. #1
    Greg Glynn
    Guest

    Excel/MSQuery - Detect when Refresh has occured

    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. #2
    Greg Glynn
    Guest

    Re: Excel/MSQuery - Detect when Refresh has occured

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0