+ Reply to Thread
Results 1 to 4 of 4

Macro to activate once web query has refreshed

  1. #1
    Forum Contributor
    Join Date
    06-28-2009
    Location
    newcastle, uk
    MS-Off Ver
    Excel 2010
    Posts
    187

    Macro to activate once web query has refreshed

    Hi all

    I have managed to use macros provided in http://www.excelforum.com/excel-prog...refreshes.html to get my web query to work correctly. The only problem I have is the archive page duplicates previous data. I have found an easy solution for this in the data ribbon, using remove duplicates.

    I have set up a macro to remove duplicates for me, which works fine, but I was wondering is there any way of triggering the macro each time the web query refreshes, so I dont have to manually run the macro every time. I have tried seaching the web but cannot find the solution I am looking for.

    The code used for the web query to transfer to the archive tab is as follows:

    Please Login or Register  to view this content.

    and the duplicate macro is as follows:

    Please Login or Register  to view this content.
    Thanks in advance
    Gemma

  2. #2
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Macro to activate once web query has refreshed

    The easiest way would be to add the line below after your final END WITH.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-28-2009
    Location
    newcastle, uk
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Macro to activate once web query has refreshed

    Thanks for the reply. I have tried to add this to the end of my macro but it does not seem to work. It lets me run the macro as normal, but none of the duplicate entries are removed.

    Gemma

  4. #4
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    65

    Re: Macro to activate once web query has refreshed

    Would you attach the workbook so I can take a look and see what's happening?

+ 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.6.0 RC 1