Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

cristpate

Erro ao correr o programa

Recommended Posts

cristpate

hi,

eu tenho um progrma simples em VB6 e estou ater um problema ao correr. da o seguinte erro

"Object variable or with block vaiable not set"

por vezes o programa correr sem esse erro mas de vez em quando da esse erro.

ajudem me sera que tenho de adicionar algum objecto?

cristpate


craziness it's to do the same thing over and over again expecting a different result

Share this post


Link to post
Share on other sites
programadorvb6

Necessitamos de código para te poder-mos ajudar.

Só de por palavras não vais lá.

Share this post


Link to post
Share on other sites
cristpate

Dim O As Object
Dim HN, ID, PWD, NL, GlobusSon, GlobusPass

NL = "C:\Program Files\application\applicationfile"

HN = "localhost"

ID = servername"

PWD = "password"

Set O = CreateObject("Desktop.Application")

GlobusSon = O.InputBox("Enter Login ID", " Login Details", "*")

GlobusPass = O.InputBox("Enter Password", "Login Details", "*")

If O.ServerLogin(HN, ID, PWD, NL) Then

    If O.SignOn(GlobusSon, GlobusPass) Then
    
    MsgBox "Success"
    
    Else
    
   MsgBox "blabla"
   
  End If
  
Else
    MsgBox "blabla"
End If



craziness it's to do the same thing over and over again expecting a different result

Share this post


Link to post
Share on other sites
programadorvb6

Fazes :

Option explicit

Dim HN, ID, PWD, NL, GlobusSon, GlobusPass as String

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.