I just started learning programing if you can call it that, i had a class on visual basic a while ago and i managed to create a nice little application now i want to implement a menu button which when you click will erase all data in all textboxes
So i managed to create a buton but although i have found many answers to my question on the net not one code had worked for me, even the one from this forums faq doesn't work.
If is probably coz i don't understand where to copy it or i am doing something wrong
I am using Windows Form Application
I tried putting the code like this but obviously it doesn't work
Code:Private Sub ClearEverthingToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearEverthingToolStripMenuItem.Click Dim ctl As Control ' Clear all the TextBoxes on the form. For Each ctl In Controls If TypeOf ctl Is TextBox Then ctl.Text = "" Next ctl End Sub