ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clear all textboxes on a form ? (https://www.excelbanter.com/excel-programming/351544-clear-all-textboxes-form.html)

SpookiePower

Clear all textboxes on a form ?
 
Is there an easy way to clear all textboxes on a form ?


SpookiePower

Clear all textboxes on a form ?
 
No problem anymore.

I did it this way.

Private Sub cmdClearFormTextBox_Click()
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Then
ctl.Text = ""
End If
Next ctl
End Sub



All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com