clearing textboxes and comboboxes in a userform

st0kvis

New member
Joined
Jun 16, 2011
Messages
3
Programming Experience
3-5
so yesterday this code was working for my userforms and today its not. Its a simple clear command for textboxes and comboboxes. what is from here? im fried.

VB.NET:
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff] [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000]Dim ctl [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] Control[/COLOR]
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Each[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ctl [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]In[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Controls
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]TypeOf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ctl [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Is[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] TextBox [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ctl.Text = [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]""
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]TypeOf[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ctl [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Is[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ComboBox [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ctl.Text = [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]""
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Next[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ctl
[/SIZE]
 
That code worked fine for me, are you sure that it is being called? Where is it located in your code?
 
Back
Top