MS VB 2008 noob here, need sum help plz

Soldato
Joined
29 Aug 2011
Posts
3,068
Location
UK
Hey guys, I have made a program on VB 2008 that can make calculation.
I want to make the password box appear first with the form not visible but after I enter the correct password(in 3 attempts). it only happens when I press the start button here the password box would come up.

any help plz?
 
Last edited:
Couple of things,
1.Your variable for "Tries" is declared as a "String" (it should be Integer).
2.By the naming I guess you have a label called "lblAccess"? what does this do?

Hmm well if I try putting Integer in and debugging it it gives me a error, leaving it as string works out.

the lblAccess wud be visible if I enter the correct password, and the form will appear up.
 
Conversion from string "sausage" to type 'Integer' is not valid, it highlights the password part. yeh lblAccess is a created label.
 
yep, so that is a data type mismatch error(you are trying to use both string and numeric data on a string variable)
Try my code, with frmMain.Show replaced by lblAccess.Visible = True

Thanks, I tried debugging but the password dialog still doesn't appear first, dont know where im going wrong. A real noob here lol
 
Would this be right, just uploaded a pic:


I've selected the Set as Startup project, ran it but still doesnt show up first.
 
Back
Top Bottom