how can i write codes that only clears specified text boxes
fourty
5
Light Poster
Recommended Answers
Jump to PostYou want to clear a textbox?..
use this..Text1.Text = ""
Jump to Postyou can write a function that clears the text boxes that you specify.
'the function takes a parameter coresponding to the name of the text box function CLEARTEXTBOXES(txtboxname as string, txtboxname2 as string,txtboxname3 as_ string) ' to txtboxnamen as string txtboxname.text="" txtboxname.set focus end function
if you …
Jump to PostGuys, we do not use "" in proper coding, but vbNullString as in -
txtBoxName.Text = vbNullString
to clear all textboxes use -
Public Sub ClearAllText(ByVal frm As Form) Dim ctl As Control For Each ctl In frm If TypeOf ctl Is TextBox Then …
All 9 Replies
fourty
5
Light Poster
jhai_salvador
48
Junior Poster
Sarama2030
0
Junior Poster in Training
AndreRet
526
Senior Poster
kinwang2009
7
Posting Whiz in Training
AndreRet
526
Senior Poster
fourty
5
Light Poster
musthu
0
Newbie Poster
musthu
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.