One of the basic rules of the universe is that nothing is perfect. Perfection simply doesn't exist. Without imperfection, neither you nor I would exist.
In VB101, lesson #4, it is suppost to display "Hello YourName" where YourName is called from the text box. I am using VB2008 Express Edition and the MsgBox command keeps putting the code as MsgBox(YourName) instead of MsgBox YourName. Anyway I keep getting a crash when it runs.
I know this training is for VB5&6, but wanted to see if you happen to know why I keep getting a crash?
Below is my actual code:
Public Class MyFirstProgram
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub ClickMeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClickMeButton.Click
MsgBox(YourName)
End Sub
Private Sub YourName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YourName.TextChanged
End Sub End Class
Reply from Richard Rost:
Benjamin, I'm not sure. I don't even have VB2008 installed here right now, so I can't test it. I'll make your post public, however, in case one of the other students might have come across this. I plan to update all of my VB courses for the latest version this summer.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visual Basic 101.