Results 1 to 2 of 2

Thread: Label not definied

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2010
    Posts
    16

    Label not definied

    when I start program I get error "Label not definied" in GoTo Resend line
    Code:
    module:
     Public Declare Sub UrlMkSetSessionOption Lib "urlmon.dll" _
    (ByVal dwOption As Long, ByRef pBuffer As Any, _
    ByVal dwBufferLength As Long, ByVal dwReserved As Long)
    
    Public Type INTERNET_PROXY_INFO
    dwAccessType As Long
    lpszProxy As String
    lpszProxyBypass As String
    End Type
    Public Const INTERNET_OPEN_TYPE_PROXY = 3
    Public Const INTERNET_OPTION_PROXY = 38
    
    Public Declare Function InternetSetOption Lib "wininet.dll" Alias "InternetSetOptionA" _
    (ByVal hInternet As Long, ByVal lOption As Long, ByRef sBuffer As Any, ByVal lBufferLength As Long) As Integer
    Public Declare Function InternetSetOptionStr Lib "wininet.dll" Alias "InternetSetOptionA" _
    (ByVal hInternet As Long, ByVal lOption As Long, ByVal sBuffer As String, ByVal lBufferLength As Long) As Integer
    
    
    form:
    Private Sub Command6_Click()
    Dim ipi As INTERNET_PROXY_INFO
    ipi.dwAccessType = INTERNET_OPEN_TYPE_PROXY
    ipi.lpszProxy = "46.37.165.113:17890"
    ipi.lpszProxyBypass = ""
    
    gstrProxyUserName = "ggggg"
    gstrProxyPassword = "hhhhhh"
    
    iRetVal = InternetSetOption(hHttpOpenRequest, INTERNET_OPTION_PROXY_USERNAME, gstrProxyUserName, Len(gstrProxyUserName))
    iRetVal = InternetSetOption(hHttpOpenRequest, INTERNET_OPTION_PROXY_PASSWORD, gstrProxyPassword, Len(gstrProxyPassword))
    GoTo Resend <<-- error
    
    Form1.WebBrowser1.Navigate "http://whatismyipaddress.com/"
    how to define GoTo Resend line ?


    End Sub

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Label not definied

    Code:
    GoTo Resend
    
    ..... other code
    
    Resend:  ' <<< this is the missing label
    labels must exist in same routine in which they are called
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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