snasui.com ยินดีต้อนรับ ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
Private Sub TextBox1_Change()
Dim i As Integer
Dim sel As Range
Set sel = [a1:ak500]
sel.Interior.ColorIndex = 0
For i = 1 To sel.Rows.Count
If sel.Rows(i).Cells(i).Value = [TextBox1].Value Then
sel.Rows(i).Interior.ColorIndex = 40
End If
Next i
End Sub
You do not have the required permissions to view the files attached to this post.
Private Sub TextBox1_Change()
Dim i As Integer
Dim sel As Range
Set sel = [a1:ak500]
sel.Interior.ColorIndex = 0
For i = 1 To sel.Rows.Count
If sel.Rows(i).Cells(i).Value = [TextBox1].Value Then
sel.Rows(i).Interior.ColorIndex = 40
End If
Next i
End Sub
Private Sub TextBox1_Change()
Dim rng As Range, cell As Range
Set rng = [a1:ak500]
rng.Interior.ColorIndex = 0
For Each cell In rng
If cell.Value = [TextBox1].Value Then
cell.Interior.ColorIndex = 40
End If
Next cell
End Sub
Private Sub CommandButton1_Click()
Dim rng As Range, cell As Range
Set rng = [a1:ak500]
rng.Interior.ColorIndex = 0
For Each cell In rng
If cell.Value = TextBox1.Value Then
cell.Interior.ColorIndex = 40
End If
Next cell
End Sub
You do not have the required permissions to view the files attached to this post.
Private Sub CommandButton1_Click()
Dim rng As Range, cell As Range
Set rng = [a1:ak500]
rng.Interior.ColorIndex = 0
For Each cell In rng
If cell.Value = TextBox1.Value Then
cell.Interior.ColorIndex = 40
End If
Next cell
End Sub
Private Sub CommandButton1_Click()
Dim rng As Range, cell As Range
Set rng = [a1:ak500]
rng.Interior.ColorIndex = 0
For Each cell In rng
If cell.Value = TextBox1.Text Then
cell.Interior.ColorIndex = 40
End If
Next cell
End Sub