+ Reply to Thread
Results 1 to 3 of 3

Web Queries from different sheets

  1. #1
    Alex Martins
    Guest

    Web Queries from different sheets

    Hi, I wrote a Macro that runs two different web queries. What I need to do is
    make them work on different sheets.

    Here's part of it:

    'Dim strCnn As String
    strCnn = "URL;" & Range("B6").Text
    With ActiveSheet.QueryTables.Add(Connection:=strCnn,
    Destination:=Range("B10"))
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True

    I want this one to work on a specific sheet, not the activsheet!

    Many thanks,
    Alex

  2. #2
    Tom Ogilvy
    Guest

    Re: Web Queries from different sheets

    With ActiveSheet.QueryTables.Add(Connection:=strCnn, _
    Destination:=Worksheets("Data6").Range("B10"))


    --
    Regards,
    Tom Ogilvy


    "Alex Martins" <Alex Martins@discussions.microsoft.com> wrote in message
    news:DC8CFBFE-D157-4226-94C0-28A2A56E122C@microsoft.com...
    > Hi, I wrote a Macro that runs two different web queries. What I need to do

    is
    > make them work on different sheets.
    >
    > Here's part of it:
    >
    > 'Dim strCnn As String
    > strCnn = "URL;" & Range("B6").Text
    > With ActiveSheet.QueryTables.Add(Connection:=strCnn,
    > Destination:=Range("B10"))
    > .FieldNames = True
    > .RowNumbers = False
    > .FillAdjacentFormulas = False
    > .PreserveFormatting = True
    >
    > I want this one to work on a specific sheet, not the activsheet!
    >
    > Many thanks,
    > Alex




  3. #3
    Alex Martins
    Guest

    Re: Web Queries from different sheets

    Thank you very much for your answer. It works perfectly!
    Alex

    "Tom Ogilvy" wrote:

    > With ActiveSheet.QueryTables.Add(Connection:=strCnn, _
    > Destination:=Worksheets("Data6").Range("B10"))
    >
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Alex Martins" <Alex Martins@discussions.microsoft.com> wrote in message
    > news:DC8CFBFE-D157-4226-94C0-28A2A56E122C@microsoft.com...
    > > Hi, I wrote a Macro that runs two different web queries. What I need to do

    > is
    > > make them work on different sheets.
    > >
    > > Here's part of it:
    > >
    > > 'Dim strCnn As String
    > > strCnn = "URL;" & Range("B6").Text
    > > With ActiveSheet.QueryTables.Add(Connection:=strCnn,
    > > Destination:=Range("B10"))
    > > .FieldNames = True
    > > .RowNumbers = False
    > > .FillAdjacentFormulas = False
    > > .PreserveFormatting = True
    > >
    > > I want this one to work on a specific sheet, not the activsheet!
    > >
    > > Many thanks,
    > > Alex

    >
    >
    >


+ 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