+ Reply to Thread
Results 1 to 2 of 2

Replace website with a cell reference in VBA code

  1. #1
    Registered User
    Join Date
    07-23-2014
    Location
    Laguna Beach, California
    MS-Off Ver
    2010
    Posts
    8

    Replace website with a cell reference in VBA code

    Where it is bolded I am trying to replace that with a cell reference such as A1 where I can input a website in that cell rather than edit the VBA code everytime

    Here is the code:

    Sub URL_Get_Query()
    With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;http://quote.money.cnn.com/quote/quote?symbols=msft", _
    Destination:=Range("a1"))

    .BackgroundQuery = True
    .TablesOnlyFromHTML = True
    .Refresh BackgroundQuery:=False
    .SaveData = True
    End With
    End Sub

  2. #2
    Registered User
    Join Date
    07-23-2014
    Location
    Laguna Beach, California
    MS-Off Ver
    2010
    Posts
    8

    Re: Replace website with a cell reference in VBA code

    thanks for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Replace absolute cell reference with Indirect cell reference in formula
    By Roothy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-11-2013, 04:46 AM
  2. [SOLVED] Replace path by cell reference
    By keewee279 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2012, 06:02 AM
  3. Replace name in formula with cell reference
    By narrowgate88 in forum Excel General
    Replies: 10
    Last Post: 09-15-2009, 12:10 PM
  4. Cell Color Code Website
    By EMoe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2005, 02:05 AM
  5. Using MATCH result in Cell Reference to replace cell contents
    By Rolls100 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-02-2005, 05:56 PM

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