snasui.com ยินดีต้อนรับ ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
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
You do not have the required permissions to view the files attached to this post.