473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Error durring compile code

When i compile the code below it error out saying that Object
Reference not set to an instance of an object......
Public newRuntimeClass As NewRuntimeMethods

Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOK.Click

If Len(Me.txtBarCode.Text) = 12 Then
newRuntimeClass.ScannedBarCode = Me.txtBarCode.Text
Close()
Else
MessageBox.Show("The Current BarCode Scanned was not
correct, Please Re Enter")
Me.txtBarCode.Text = String.Empty
txtBarCode.Focus()
End If
End Sub
Jan 8 '08 #1
5 1045

"cmdolcet69" <co************@hotmail.comkirjoitti viestissä
news:ea**********************************@t1g2000p ra.googlegroups.com...
When i compile the code below it error out saying that Object
Reference not set to an instance of an object......
Public newRuntimeClass As NewRuntimeMethods
It should be:

Public newRuntimeClass As New NewRuntimeMethods

-Teemu

Jan 8 '08 #2
On Jan 8, 8:55 am, "Teemu" <tsir...@hotmail.comwrote:
"cmdolcet69" <colin_dolce...@hotmail.comkirjoitti viestissänews:ea********************************** @t1g2000pra.googlegroups.com...
When i compile the code below it error out saying that Object
Reference not set to an instance of an object......
Public newRuntimeClass As NewRuntimeMethods

It should be:

Public newRuntimeClass As New NewRuntimeMethods

-Teemu
When i place the New keyword in front of the class it will ask me for
all these parameters.
Jan 8 '08 #3
Then it appears your constructor for the NewRuntimeMethods requires
parameters to be passed to it. You must then do something like

Public newRuntimeClass as New NewRuntimeMethods(a, b, c)

Also, I believe you meant to say you get the "object not set to instance"
error at runtime. It shouldn't happen at compile time.

"cmdolcet69" wrote:
On Jan 8, 8:55 am, "Teemu" <tsir...@hotmail.comwrote:
"cmdolcet69" <colin_dolce...@hotmail.comkirjoitti viestissänews:ea********************************* *@t1g2000pra.googlegroups.com...
When i compile the code below it error out saying that Object
Reference not set to an instance of an object......
Public newRuntimeClass As NewRuntimeMethods
It should be:

Public newRuntimeClass As New NewRuntimeMethods

-Teemu

When i place the New keyword in front of the class it will ask me for
all these parameters.
Jan 8 '08 #4
On Jan 8, 3:55 pm, "Teemu" <tsir...@hotmail.comwrote:
"cmdolcet69" <colin_dolce...@hotmail.comkirjoitti viestissänews:ea********************************** @t1g2000pra.googlegroups.com...
When i compile the code below it error out saying that Object
Reference not set to an instance of an object......
Public newRuntimeClass As NewRuntimeMethods

It should be:

Public newRuntimeClass As New NewRuntimeMethods

-Teemu
I also checked it on vb.net 2005 "express" but there's nothing called
"newRuntimeMethods".

Only "RuntimeMethodHandle" exists with most similarity. Is it a
special class or not express version?
Jan 8 '08 #5
"kimiraikkonen" <ki*************@gmail.comschrieb:
>I also checked it on vb.net 2005 "express" but there's nothing called
"newRuntimeMethods".
It seems to have to do something with scanning barcodes as it has a
'ScannedBarCode' property.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 9 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Daniel | last post by:
is it possible to install multiple copys of the same .net web service on the same computer but with different service names specified durring instalation?
4
by: konf | last post by:
Hallo, I tried to compile PGSQL 7.4 and I got error (durring make): ar: command not found What is it? Whe I can found it? I have: $ uname -a SunOS ... 5.8 Generic_108528-03 sun4u sparc...
10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
0
by: rollasoc | last post by:
Hi, I seem to be getting a compiler error Internal Compiler Error (0xc0000005 at address 535DB439): likely culprit is 'BIND'. An internal error has occurred in the compiler. To work around...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
0
by: Catherine Tarbox via .NET 247 | last post by:
I am getting a Microsoft Visual C++ Runtime Library error whenrunning an application I built in VB.NET. The error occursinfrequently and at different time during execution. The errortext is: ...
5
by: MLH | last post by:
A97 aborts creation of MDE reporting that there's a compile error in one form. Sure enough, if I remove the form from the source database and attempt to compile the MDE, it succeeds. But when I...
0
by: Daniel | last post by:
What do FTP servers do when file send fails durring a file upload? Are partial files ever written? does ftp protocol cover this?
4
by: yohanus | last post by:
im haveing problems with the following piece of code in getting an error durring compilling which says error c2065; 'arraySize' : undeclared identifier line 54 error c2065: 'anArray' :...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.