user2678408
user2678408

Reputation: 117

Reference to a non-shared member requires an object reference Error When Opening Form

I got the following error when Trying to Open a Form in Visual Basic

Error   1   Reference to a non-shared member requires an object reference.  c:\users\alex96\documents\visual studio 2013\Projects\Home Work Calendar\Home Work Calendar\StartUp.vb  25  13  Home Work Calendar

and Here is the code I used to open the form (the not working line)

 frmCourses.Show()

Normally, this would work, but now it isn't and I don't think I did anything different when creating the other form

Upvotes: 0

Views: 10950

Answers (1)

Scott Savage
Scott Savage

Reputation: 373

Create an instance of the object.

Dim xForm as new frmCourses
xForm.Show

Upvotes: 1

Related Questions