Hi all,
I have encountered the following weird situation. The following codes run well in the IDE (when we click the Green Play button). But the codes won't execute when actually using the excel file - after open the file, click the the "START" button, then a userform will be shown. There are few textboxes, enter anything into the textbox, then click the commandbutton at the bottom suppose will set all the textbox to null (as it did in the IDE). But it won't work here.
I attached a copy of the file to ease you to look at the problem.
Download it from my dropbox: http://dl.dropbox.com/u/68179510/Sample%201.xls
The following codes is part of the codes in the UserForm1
Sub ButtonReset_Click()
Dim Ctrl As Control
For Each Ctrl In UserForm1.Controls
If TypeName(Ctrl) = "TextBox" Then
Ctrl.Value = vbNullString
End If
Next Ctrl
End Sub
Thank you very much for all the attention and helps
I have encountered the following weird situation. The following codes run well in the IDE (when we click the Green Play button). But the codes won't execute when actually using the excel file - after open the file, click the the "START" button, then a userform will be shown. There are few textboxes, enter anything into the textbox, then click the commandbutton at the bottom suppose will set all the textbox to null (as it did in the IDE). But it won't work here.
I attached a copy of the file to ease you to look at the problem.
Download it from my dropbox: http://dl.dropbox.com/u/68179510/Sample%201.xls
The following codes is part of the codes in the UserForm1
Sub ButtonReset_Click()
Dim Ctrl As Control
For Each Ctrl In UserForm1.Controls
If TypeName(Ctrl) = "TextBox" Then
Ctrl.Value = vbNullString
End If
Next Ctrl
End Sub
Thank you very much for all the attention and helps
