+ Reply to Thread
Results 1 to 7 of 7

amendment of web query save VBA

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

    amendment of web query save VBA

    Hi all

    I have a VBA set up for when my web query refreshes. I have posted it below. Whe it refreshes and the data is ifferent, the new value refreshes on the next availavle blank cell. Am I able to change the code slightly so that when the web query refreshes and the data changes, the new value will go in cells from left to right ie to cell b1, then c1 etc.

    Thanks in advance

    Gemma

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim LC As Long
    LC = Cells(1, Columns.Count).End(xlToLeft).Column
    If Not Intersect(Target, Range("A1:a1")) Is Nothing Then
    Application.EnableEvents = False
    Range("A1:a1").Copy Cells(1, LC + 1)
    Application.EnableEvents = True
    End If
    End Sub

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

    Re: amendment of web query save VBA

    does anyone know if this is possible please?

    thanks
    gemma

  3. #3
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: amendment of web query save VBA

    Hi batjl9
    You will need to adapt the code at the end of your refresh code..
    as "Private Sub Worksheet_Change(ByVal Target As Range)" will not triggering
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

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

    Re: amendment of web query save VBA

    do you have any ideas on how i would do that as pretty much a novice at this thing?

    thanks
    gemma

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: amendment of web query save VBA

    batjl9
    what the refresh code?

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

    Re: amendment of web query save VBA

    i am having a problem knowing how to change this
    Last edited by batjl9; 04-02-2011 at 05:06 PM.

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

    Re: amendment of web query save VBA

    yes im not sure on the refresh code

+ 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