ต้องเขียนโค๊ดเรียงลำดับตัวเลขจากน้อยไปมากเขียนยังไงครับ VB6
ผมสร้าง textbox มา4 อันแล้วใส่ตัวเลขไปในนั้น พอกดปุ่มcommand button จะให้มันเรียงตัวเลขจากน้อยไปมาก ต้องเขียนยังไงครับ ในcmdArrange_Click...ช่วยแนะนำด้วยครับ ---------------------------------------------------------------- Private Sub cmdArrange_Click() End Sub
Private Sub cmdClear_Click() txtName1 = "" txtName2 = "" txtName3 = "" txtName4 = "" End Sub
Private Sub cmdOK_Click() If txtName1.Text = "" Then txtName1.Text = txtNumber ElseIf txtName2.Text = "" Then txtName2.Text = txtNumber ElseIf txtName3.Text = "" Then txtName3.Text = txtNumber Else txtName4.Text = txtNumber End If txtNumber = "" txtNumber.SetFocus End Sub
|