Results 1 to 6 of 6

Excel UserForm. Click Button to open explorer and go to URL within a text box

Threaded View

  1. #1
    Registered User
    Join Date
    01-13-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    9

    Excel UserForm. Click Button to open explorer and go to URL within a text box

    Hello,

    Wondering if anyone can help me? I have a UserForm that contains a number of text boxes. One of those text boxes contains a URL. I want to find a way I can either double click the text box, or click a command button, which will open Internet Explorer and navigate to the URL contained within the textbox.

    I have searched and found the below code which people say is working for them but is bugging for me at the .HyperlinkAddress = Me!txtURL line



    Private Sub cmdGo_Click()
    
        Dim ctl As CommandButton
    
        Set ctl = Me!cmdGo
    
         If Len(ctl & vbNullString) > 0 Then
    
             With ctl
    
                 .HyperlinkAddress = Me!txtURL
    
                 .Hyperlink.Follow
    
             End With
    
         End If
    
    End Sub

    Any help on this would be appreciated. Thanks

    Also asked here http://www.ozgrid.com/forum/showthre...goto=newpost** and http://www.mrexcel.com/forum/excel-q...l-textbox.html

    and SOLVED
    Last edited by stevefisher85; 02-19-2016 at 06:11 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Click Button in Internet Explorer using VBA
    By bishop-jese-erl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-16-2015, 12:39 AM
  2. Click an un-named button in Internet Explorer with Excel VBA
    By nmarcley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-08-2015, 10:04 AM
  3. Button Click on Spreadsheet commanded by Button Click on Userform
    By Quilie19 in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 04-07-2015, 11:35 PM
  4. Code a Command Button on UserForm not to close upon click - Excel VBA
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-14-2012, 02:20 PM
  5. How to open Excel files and click a button ?
    By bananas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-02-2008, 11:28 AM
  6. Open Explorer With A Button
    By SamuelT in forum Excel General
    Replies: 4
    Last Post: 09-18-2007, 04:27 AM
  7. [SOLVED] Open CSV file by double-click on explorer all data in one column
    By evadell@gmail.com in forum Excel General
    Replies: 6
    Last Post: 02-23-2006, 12:10 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