PDA

View Full Version : Vb.Net Help


machinegun777
July 6th, 2009, 06:02 PM
I'm not sure if any of you are program with VB.Net, but if you do, can you help me with something?


Dim CurrentRowIndex As Integer = frmMain.DataGridView1.CurrentRow.Index.ToString


Whenever I try the above it gives me the following error:


Object Reference not set to an Instance of an Object


Any help would be appreciated :D

Gumball Watterson
July 6th, 2009, 09:24 PM
Try putting Integer.Parse( before the Index.ToString at the right and make sure you got it all in a TryCatch. But I am not 100% sure. What version are you using? .NET 3.5? VB 2008?

Archer
July 6th, 2009, 10:42 PM
Where are you declaring this? And does this line throw the up the error itself or as a result?

Either way, this may be of some help:
http://forums.aspfree.com/net-development-11/common-causes-of-object-reference-not-set-to-an-instance-45799.html

Alinthea
July 7th, 2009, 12:28 AM
It seems like it is not finding it for some reason.
Are your naming conventions correct?

The annoying this is, it could say there is an error there and the problem is somewhere else.

Try to explain what you are trying to do in the program.

machinegun777
July 7th, 2009, 03:50 AM
It seems like it is not finding it for some reason.
Are your naming conventions correct?

The annoying this is, it could say there is an error there and the problem is somewhere else.

Try to explain what you are trying to do in the program.


What the program is supposed to do is keep your passwords you use to login to different websites so in case you ever forget your password or any other information you can check out the program.

Did you want the source code?

Try putting Integer.Parse( before the Index.ToString at the right and make sure you got it all in a TryCatch. But I am not 100% sure. What version are you using? .NET 3.5? VB 2008?

Visual Basic 2008 Express Edition

Alinthea
July 7th, 2009, 10:47 AM
What the program is supposed to do is keep your passwords you use to login to different websites so in case you ever forget your password or any other information you can check out the program.

Did you want the source code?

Ahhh. I see.
Yes, do send it to me in a PM.

My VB is a little rusty, but I will have a look for you.

machinegun777
July 7th, 2009, 04:02 PM
Ahhh. I see.
Yes, do send it to me in a PM.

My VB is a little rusty, but I will have a look for you.


Well it turns out my Dad was finally able to help me figure out the problem :) ! So I don't need help anymore, but thanks anyways.