Tüm TextBox'lar Temizlensin

D

Drenated

Legend Member
Joined
Nov 23, 2019
Messages
1,865
Reaction score
1,517
Code:
Sub ClearAllTextBoxes(frmTarget As Form)
For i = 0 To (frmTarget.Controls.Count - 1)
Set ctrlTarget = frmTarget.Controls(i)
'If it's a textbox, clear it
If TypeOf ctrlTarget Is TextBox Then
ctrlTarget.Text = ""
End If
Next i
End Sub

Aşağıdaki kodu da örneğin bir komut butonunun Click olayına yerleştirerek textboxları temizleyebilirsiniz.

ClearAllTextBoxes FormName
 
SPAM IS FORBIDDEN!
  • SPAMMERS ARE BANNED FROM THE FORUM AND CANNOT USE ANY OF THE CHEATS
  • For example: thanks, thx, very good, asdqwe, working, ty and so on!
  • For example: Writing the same message over and over. thanks, thx and so on!
  • Copying and copying someone else's message is prohibited.
  • It is forbidden to send messages to increase the number of comments on threads that you have no knowledge of.
  • Write your own opinion when commenting!
  • If you see spam message, please let us know with the REPORT button!

Tema düzenleyici

Top Bottom