Hi everyone
I would like that when a value appears in the TextBox1, that value must be compared with the column "AA" of the 'Main' sheet, and if the value is present select the sheet with the name corresponding to the searched value.
I tried but can't, please help / advice, thanks in advance.
I would like that when a value appears in the TextBox1, that value must be compared with the column "AA" of the 'Main' sheet, and if the value is present select the sheet with the name corresponding to the searched value.
I tried but can't, please help / advice, thanks in advance.
VBA Code:
Private Sub TextBox1_AfterUpdate()
Dim ws As Worksheet
Dim wk_master As Workbook
Dim ws_master As Worksheet
Set wk_master = ActiveWorkbook
Set ws_master = wk_master.Worksheets("Main")
If Me.TextBox1.Value = ws_master.Cells(1, 26).Value Then
Set ws = ThisWorkbook.Worksheets(Me.TextBox1.Value)
ws.Select
End If
End Sub