Windows/Visual Basic Message Errors

  • Thread starter Mario R Domenici
  • Start date
M

Thread Starter

Mario R Domenici

I have a Industrial PC with dedicated automation
Software (VB source)/ Windows 98, When the PC
is initialized Windows always shows the following
message "Run Time Error 91 Object Available With Block Available Not Set".

I'd like to know what it means ?
 
B
Normally this is caused by the software trying to reference an object that is not present on the PC. An object could be a *.dll file or a *.ocx file. The *.ocx file is an activex object.

My suggestion is to do a full install of the Visual Basic application. This should ensure that the required files are installed in the right directories.

If this does not work then Windows operating system probably has someting missing. In order to fix that you should download the latest service pack from the MSN site and install it.

You could also try installing the Application on another PC. If this works it means there is something missing in your operating system.

I wish you luck.
 
Mario R Domenici asked about the error message:
> > "Run Time Error 91 Object Avaiable With Block Avaiable Not Set"

Bryan Steer:
> Normally this is caused by the software trying to reference an object
> that is not present on the PC. An object could be a *.dll file or a *.ocx
> file. The *.ocx file is an activex object.

> My suggestion is to do a full install of the Visual Basic application.
...
> If this does not work then Windows operating system probably has someting
> missing.
...

You mean - VB doesn't give you any way of telling *what*'s missing?

Surely that's not right.


Jiri
--
Jiri Baum <[email protected]> http://www.csse.monash.edu.au/~jirib
MAT LinuxPLC project --- http://mat.sf.net --- Machine Automation Tools
 
<P>Here's what the VB help file says about it:</P>

<P>There are two steps to creating an object variable. First you must declare the object variable. Then you must assign a valid reference to the object variable using the Set statement. Similarly, a With...End With block must be initialized by executing the With statement entry point. This error has the following causes and solutions: </P>

<P>· You attempted to use an object variable that isn't yet referencing a valid object.</P>

<P>Specify or respecify a reference for the object variable. For example, if the Set statement is omitted in the following code, an error would be generated on the reference to MyObject:</P>
<PRE>
Dim MyObject As Object ' Create object variable.
Set MyObject = Sheets(1) ' Create valid object reference.
MyCount = MyObject.Count ' Assign Count value to MyCount.
</PRE>
<P>· You attempted to use an object variable that has been set to Nothing.</P>
<PRE>
Set MyObject = Nothing ' Release the object.
MyCount = MyObject.Count ' Make a reference to a released object.
</PRE>
<P>Respecify a reference for the object variable. For example, use a new Set statement to set a new reference to the object.</P>

<P>· The object is a valid object, but it wasn't set because the object library in which it is described hasn't been selected in the References dialog box.</P>

<P>Select the object library in the Add References dialog box.</P>

<P>· The target of a GoTo statement is inside a With block.</P>

<P>Don't jump into a With block. Make sure the block is initialized by executing the With statement entry point.</P>

<P>· You specified a line inside a With block when you chose the Set Next Statement command.</P>

<P>The With block must be initialized by executing the With statement.</P>
 
I got also a problem ERROR 91 when I run the program. I don't have this problem wen my VB-editor is running????. I can't find out what this is normaly it's a missing part in the objectliberary. But I am olmost sure it's somting else. It happens wen I restart the program and when it arrives at the first control

Label149.Visible = True

it gives me the error 91 ???

Did you already found out what's wrong?

Marcel
 
Top