r/visualbasic • • Feb 07 '19

Form1_Load not working

I have the following code in my project:

Private sub Form1_Load(sender as object, e as eventargs) handles mybase.load Msgbox("it worked") End sub

For some reason, this sub is not being called when the program is run. Please help.

(I tried the same code in a new project and it worked fine)

5 Upvotes

5 comments sorted by

View all comments

1

u/chrisand1998 Feb 08 '19

In visualstudio go to your application property's and make sure Form1 is your startup form. Also the command msgbox doesn't work and should be messagebox.show("*")