Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,259
- Office Version
- 2010
- Platform
- Windows
Hi hope you can help me please, I have the following code below, where when command button is clicked on I want it to auto update textbox1 with the data it finds in sheet 5, Colum A and row 1, can you help me please?
Code:
Private Sub CommandButton5_AfterUpdate()
Dim Fnd As Range
Set Fnd = Sheets("Sheet5").Range("A:A").Find(CommandButton5.Value, , , xlWhole, , , False, , False)
If Not Fnd Is Nothing Then
TextBox1.Value = Fnd.Offset(, 1).Value
End If
End Sub