สอบถามวิธีการกำหนดจุดทศนิยม ทีละหลายๆ textbox
Posted: Tue Oct 22, 2019 6:24 am
สวัสดีค่ะ รบกวนช่วยดูให้หน่อยค่ะว่าสามารถกำหนดทศนิยมแบบใช้ For Loop ได้หรือไม่ เนื่องจากมีจำนวน textbox เยอะค่ะ ถ้าสามารถทำได้ต้องเขียน code อย่างไรคะ
ตัวอย่าง code บางส่วนค่ะ
ตัวอย่าง code บางส่วนค่ะ
Code: Select all
Private Sub TextBox134_Change()
TextBox134.Text = Format(TextBox134, "##0.000")
End Sub
Private Sub TextBox135_Change()
TextBox135.Text = Format(TextBox135, "##0.000")
End Sub
Private Sub TextBox136_Change()
TextBox136.Text = Format(TextBox136, "##0.000")
End Sub
Private Sub TextBox137_Change()
TextBox137.Text = Format(TextBox137, "##0.000")
End Sub
Private Sub TextBox138_Change()
TextBox138.Text = Format(TextBox138, "##0.000")
End Sub
Private Sub TextBox139_Change()
TextBox139.Text = Format(TextBox139, "##0.000")
End Sub
Private Sub TextBox140_Change()
TextBox140.Text = Format(TextBox140, "##0.000")
End Sub