Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call Runner.Stop error?

Status
Not open for further replies.

kenguru

Programmer
May 14, 2004
173
0
0
RO
Hello,

I have the following lines in a sample code, which should be correct:
Handler:
Call Runner.Stop
Call MsgBox(Err.Description + vbCrLf + Err.Source)

But i got the following error code:
Object variable or with block variable not set, on the first line (call runner.stop)

I got the same error problem on more samples, but in the help there is nothing about this.
Should i activate something?

Thank you!
 
Sure your sample is VB6? Several languages have a native Runner object, but I'm not aware of one in VB6

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Yes, because in the help it says that it is in VB 6.0.
 
Highlight the word Runner and rightclick. Select Definition from the context menu will take you to the code where the object is defined (if any). If not defined then you will need to find the code that creates the object and stick it in a code module.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
I've used VB for more than 10 years, and never heard of a Runner object. If I search in MSDN Library Visual Studio 6.0 for "Runner" I get no hits, in any language. I don't even find it in Visual Studio 2005 (thought maybe you were working with VB.NET).

Perhaps you could paste your Help documentation?


 
The "Runner" is defined later in the code.

Maybe if yu saw this you will understand better my code:
Private Sub Command1_Click()
On Error GoTo Handler
Call Hello
End
Handler:
Call Runner.Stop
Call MsgBox(Err.Description + vbCrLf + Err.Source)
End Sub

The error code which i wrote it is at the line "runner.stop" but it is an error code of the program. Some value is null and because of that. I did figured it out yet why is null the value.

Thank You for your ideas !
 
I think you either need to:
1. Reference some library that has the Runner object
OR
2. You were supposed to create the Runner class yourself (I would suppose the code is in the Help file you are looking at)

 
Well, this error means that you're code is trying to reference an object that hasn't been instantiated. Either Runner hasn't been, or an object that the Stop method references hasn't been. If the latter, I suggest a ritual burning of the Runner class would be in order. Unless of course you wrote it, in which case I suggest you fix it. :)

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top