Another NullReference Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This code has been working for some months - suddenly it get a NullReference
error

Private Sub btnShowProj_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnShowProj.Click
Dim frmShowProject As New frmProjectEdit
... a bunch of code ...
frmShowProject.ShowDialog()
... a bunch of code ...

error is on the showdialog line.

frmProjectEdit exists

I don't know if it's related but lately I've had errors with unregistered
wrapper assemblies for microsoft libraries

TIA for any replies
 
Double check all the code that is executing during the construction of
frmShowProject. Just use the debugger and step in on the line:

Dim frmShowProject As New frmProjectEdit
 
The code executes "Public Sub New()" in "Public Class frmProjectEdit"
New() is in " Windows Form Designer generated code " .
New() contains only the auto generated code
There is no reference to frmShowProject in the intervening code

Again, this was working fine for quite some time until last Friday. There
was not changes made to frmProjectEdit at that time
 
Back
Top