Link to home
Start Free TrialLog in
Avatar of YZlat
YZlatFlag for United States of America

asked on

open a from

I have two forms in my project, Form1 and Form2. I'm trying to open Form2 from Form1:

In the Form1_Load event I have:

Dim f As Form2=New Form2
 f.Show() <- get an error here - "Object reference not set to an instance of an object."

What am I doing wrong?
Avatar of mydasx
mydasx

put a break point in the formload of page 2 and check your variables there.
Dim f As New Form2
f.Show()
Avatar of YZlat

ASKER

davidrichardson  I've tried that already

mydasx, in line Dim f As Form2=New Form2, f is fine, but it still gives me an error in line
f.Show
ASKER CERTIFIED SOLUTION
Avatar of mydasx
mydasx

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of YZlat

ASKER

it does not even get to Form2_Load
did you hit f11 on the call?