Results 1 to 5 of 5

Thread: Shell URL

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2009
    Posts
    492

    Shell URL

    I have problem, why does't work ?

    Please!


    Code:
    Private Sub Command1_Click()
    
    Dim a As String
    a = "http://www.yahoo.com"
    
    Shell a, vbNormalFocus
    
    End Sub

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Shell URL

    Refer

    Or
    Code:
    Shell "c:\Program Files\Internet Explorer\iexplore.exe http://www.google.com", vbNormalFocus
    Please mark you thread resolved using the Thread Tools as shown

  3. #3
    Hyperactive Member jp26198926's Avatar
    Join Date
    Sep 2008
    Location
    General Santos City, Philippines
    Posts
    310

    Re: Shell URL

    Code:
    Dim a As String
    a = "http://www.yahoo.com"
    
    Shell "explorer " & a, vbNormalFocus
    "More Heads are Better than One"

  4. #4
    Lively Member Raiser's Avatar
    Join Date
    Oct 2009
    Location
    Tamilnadu,India.
    Posts
    68

    Re: Shell URL

    I think it could be useful for you...

    http://www.vbforums.com/showthread.php?t=233950

  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Shell URL

    if you want the link to open in the default browser use the shellexecute API
    there are many examples in this forum
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width