Results 1 to 4 of 4

Applying a formula to Get From Web URL with VBA Macro

Threaded View

  1. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Applying a formula to Get From Web URL with VBA Macro

    I can see 2 problems:
    obvious one - sum in VBA
    more complicated - double quotes. probably web contents expects string enclosed in double quotes. so to start such string you need 3 doublequotes - first is just "this will be string" signal, next 2 will be interpreted as one doublequote
    Try:
    Source = Xml.Tables(Web.Contents("""http://www.thisurl.com/" & application.sum(1,2,3) & "/restOfTheUrl"""))
    or
    Source = Xml.Tables(Web.Contents( chr(34) & "http://www.thisurl.com/" & application.Sum(1,2,3) & "/restOfTheUrl" & chr(34) ))
    Last edited by Kaper; 10-24-2017 at 05:26 PM.
    Best Regards,

    Kaper

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro help applying formula to dynamic number of rows for different files (s/b EASY)
    By yankeekid86 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-20-2014, 04:38 PM
  2. Help with applying this macro to the whole workbook
    By Sagaroth in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2013, 07:07 AM
  3. [SOLVED] Applying Macro across several worksheets
    By daniel_t in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2012, 02:08 PM
  4. Macro: Applying formula to multiple cells in excel (formula editing)
    By city in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2012, 06:41 AM
  5. applying formula and formatting to group of cells in a macro
    By vmd0957 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-24-2008, 04:53 PM
  6. Applying macro within a custom macro button to all workbooks
    By clearwaterdave in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2007, 12:16 PM
  7. Applying macro within a custom macro button to all workbooks
    By BigBas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2007, 03:34 PM
  8. Applying Macro to only certain sheets
    By Darin Kramer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2005, 01:05 PM

Tags for this Thread

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