Object refernce not set (newbie question)

  • Thread starter Thread starter JH
  • Start date Start date
J

JH

"Object reference not set to an instance of an object" is the error I got
whenever I run a code that has the following. It crashes when Itry to assign
Bob with the sysInfo1.OSPlatform
Dim SysInfo1 As SysInfoLib.SysInfo

Dim Bob As Short

......

Bob = SysInfo1.OSVersion

.....
 
* "JH said:
"Object reference not set to an instance of an object" is the error I got
whenever I run a code that has the following. It crashes when Itry to assign
Bob with the sysInfo1.OSPlatform
Dim SysInfo1 As SysInfoLib.SysInfo

Why do you soll use the library and not the .NET classes/methods for
this purpose? You never instantiate the class, you will have to use
something like this (notice the 'New' keyword):

\\\
Dim SysInfo1 As New SysInfoLib.SysInfo()
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top