![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: NSW. Australia
Posts: 64
|
On a form with multiple text fields and a next command button what code would I need to clear each text box when the next command button is clicked on?
Thanks in advance |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Feb 2002
Posts: 76
|
Quote:
Private Sub NextButton_Click() Me.TextBox1.Value = "" Me.TextBox2.Value = "" End Sub Just do that for all your textboxes that you want cleared. [ This Message was edited by: John McGraw on 2002-04-30 18:30 ] |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Or you could simply loop through each
textbox and cler it if you have a few eg Dim tb As MSForms.TextBox For Each tb In Me.Controls tb.Text = "" Next |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Location: NSW. Australia
Posts: 64
|
Thankyou John
Works perfectly. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|