Page 1 of 1

กดปุ่มค้นหาแล้วขึ้นแบบนี้คืออะไรค่ะ

Posted: Fri Oct 06, 2017 11:30 am
by Benmore
กดปุ่มค้นหาแล้วขึ้นแบบนี้คืออะไรค่ะ? form2

Code: Select all

Private Sub BTsearch_Click()
    Dim txt As String
    On Error Resume Next
    'Err.Clear
    Dim nRow As String
    nRow = Sheet9.Columns(1).Find(txtsearch.Text).Row
    If Err.Number = 91 Then
        TextBox1.RowSource = "txtsearch.Text"
          MsgBox "ไม่พบข้อมูล"
    End If
    txt = Cells(nRow, 1) & vbCrLf & Cells(nRow, 2) & vbCrLf & Cells(nRow, 3) _
        & vbCrLf & Cells(nRow, 4)
    TextBox1.Value = txt
End Sub
error.png
Uniform_EGAS1.xlsm

Re: กดปุ่มค้นหาแล้วขึ้นแบบนี้คืออะไรค่ะ

Posted: Fri Oct 06, 2017 9:17 pm
by snasui
:D เป็นการกำหนด TextBox ให้แสดงแบบบรรทัดเดียว อักขระที่เห็นคือ Character ที่เป็นค่าของ VbCrLf ครับ

Re: กดปุ่มค้นหาแล้วขึ้นแบบนี้คืออะไรค่ะ

Posted: Tue Nov 14, 2017 12:37 pm
by Benmore
ตรงนี้ทำได้แล้ว ขอบคุณค่ะ