Results 1 to 6 of 6

VB Code to enter cell content within VB code

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to enter cell content within VB code

    I am using below code to go to certain website.
    In the below code i need to make Address part to be variable.
    So assume i have http://www.google.com in cell C4, I need the content of Cell C4 inserted in Address:=
    so that i dont have to create seperate Sub for each Website, just need to enter the website address in excel.
    Sub WebSite1()
    ThisWorkbook.FollowHyperlink Address:="http://www.google.com", NewWindow:=True
    End Sub
    
    Sub WebSite2()
    ThisWorkbook.FollowHyperlink Address:="http://www.Yahoo.com", NewWindow:=True
    End Sub
    
    Sub WebSite3()
    ThisWorkbook.FollowHyperlink Address:="http://www.CNN.com", NewWindow:=True
    End Sub
    Please let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files
    Last edited by rizmomin; 01-21-2017 at 05:42 PM. Reason: Wrap

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Split cell's content by using VBA code
    By Tapyr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2016, 09:37 AM
  2. VBA Code to delete Row on Content of one Cell
    By Jes1397 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-08-2015, 06:29 PM
  3. [SOLVED] VB Code to check the content in cell
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2014, 11:06 AM
  4. Cell content + Macro code
    By frank35 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-12-2013, 12:07 PM
  5. VBA -- pouse code to enter data in a worksheet, and then resume code
    By jcm4ccc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-26-2013, 12:59 PM
  6. [SOLVED] what code can delete cell content
    By colwyn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2008, 08:19 AM
  7. Code in cell but need to do Alt-Enter and put more code
    By comptechbranden in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-07-2007, 12:57 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