Hi again,
Thanks to all who helped last time!
Now, I have been in my class on VB.net for about 4 weeks now and I'm really pulling my hair out because I just don't get the declaring variable thing at all. Everyweek that goes by I'm losing 10% on my grade and I'm down to 65% now. So I'm looking for an easy explanation of how to declare a variable using a Dim statement and relating it to whatever the event is supposed to do.
This week we're doing a salary calculator for a period of a lifetime but I haven't been able to get the simple task of declaring a variable correctly so I've really fallen fast in this class.I've been busting my ass to understand this but the only thing I keep getting from my classmates or instructor is read the book (which doesn't explain it clearlyl) or look to the web. I'm really past the point where I can do this alone because I'm so frustrated and confused on where to start. I haven't gotten the help from the start so I'm really confused about how to do the basic of the basic.
***********************************************
This is where I want to start. * option strict is set to on as a requirement.*
I need to start step by step, like this: *First I do know how to do the design part* (that's the easy part)
If I had a simple text box (which would be TextBox1) and wanted someone to only enter a name or show it will show a message on the background of the program area if they enter a number.
I was told to declare the variable as:*at the top of the form*
Dim NameBox As Char
So next I put:
If NameBox <> Char then MessageBox.Show "Please enter a name"
*I put this in the sub for the textbox1.
I get all kinds of error messages at the bottom of the screen. This is how basic I need to start. I also have no idea what to do if someone enters a number.
What am I doing wrong????
thanks
Tom
Thanks to all who helped last time!
Now, I have been in my class on VB.net for about 4 weeks now and I'm really pulling my hair out because I just don't get the declaring variable thing at all. Everyweek that goes by I'm losing 10% on my grade and I'm down to 65% now. So I'm looking for an easy explanation of how to declare a variable using a Dim statement and relating it to whatever the event is supposed to do.
This week we're doing a salary calculator for a period of a lifetime but I haven't been able to get the simple task of declaring a variable correctly so I've really fallen fast in this class.I've been busting my ass to understand this but the only thing I keep getting from my classmates or instructor is read the book (which doesn't explain it clearlyl) or look to the web. I'm really past the point where I can do this alone because I'm so frustrated and confused on where to start. I haven't gotten the help from the start so I'm really confused about how to do the basic of the basic.
***********************************************
This is where I want to start. * option strict is set to on as a requirement.*
I need to start step by step, like this: *First I do know how to do the design part* (that's the easy part)
If I had a simple text box (which would be TextBox1) and wanted someone to only enter a name or show it will show a message on the background of the program area if they enter a number.
I was told to declare the variable as:*at the top of the form*
Dim NameBox As Char
So next I put:
If NameBox <> Char then MessageBox.Show "Please enter a name"
*I put this in the sub for the textbox1.
I get all kinds of error messages at the bottom of the screen. This is how basic I need to start. I also have no idea what to do if someone enters a number.
What am I doing wrong????
thanks
Tom