PDA

View Full Version : Sort by second column in listbox



hitmen
01-20-2014, 10:21 AM
Hi everyone,

I am developing tools entry data, but i have problem.

when button btnSelect1 (>|) click, must be

1. Pls help me to appears ID drug in textbox 11, textbox 12, textbox 13, textbox 14, textbox 15
2. Sort textbox 1, textbox 2, textbox 3, textbox 4, textbox 5
by textbox 11, textbox 12, textbox 13, textbox 14, textbox 15 (by ID drug)
3. txtregiment= textbox 1/textbox 2/textbox 3/textbox 4/textbox 5 (by ID drug)

Pls help me

Bob Phillips
01-20-2014, 11:12 AM
Private Sub Entry_Click()

With Worksheets("Basic")

.Range(.Range("A2"), .Range("A2").End(xlDown)).Resize(, 2).Sort Key1:=.Range("B2"), Order1:=xlAscending, Header:=xlYes
End With

Nhap_Lieu.Show
End Sub

hitmen
01-20-2014, 06:31 PM
Private Sub Entry_Click()

With Worksheets("Basic")

.Range(.Range("A2"), .Range("A2").End(xlDown)).Resize(, 2).Sort Key1:=.Range("B2"), Order1:=xlAscending, Header:=xlYes
End With

Nhap_Lieu.Show
End Sub



Thank you, but how to appears ID Drug in textbox 11, textbox 12, textbox 13, textbox 14, textbox 15????????

Bob Phillips
01-21-2014, 06:37 AM
Don't understand.

hitmen
01-22-2014, 04:01 AM
Don't understand.

how to know regiment: Cepotab 200/Deconex 200/Macrolon 250 the same Macrolon 250/Deconex 200/Cepotab 200 the same Macrolon 250/Cepotab 200/Deconex 200