FuNeS13
Board Regular
- Joined
- Oct 25, 2016
- Messages
- 161
- Office Version
- 365
- 2016
- Platform
- Windows
- Mobile
- Web
I'm bumping to this error with this code... Anyone know how can it be fixed? I tried several different options but none seem to work...
Code:
Private Sub TextBox1_AfterUpdate()
With Me
Dim sht1 As Worksheet, sht2 As Worksheet, wb As Workbook
Set wb = ActiveWorkbook
Set sht1 = wb.Worksheets("Data")
Set sht2 = wb.Worksheets("Entries")
Dim I As Long
I = Worksheets(2).Range("A1048576").End(xlUp).Offset(1, 0).Row
.TextBox2 = Application.WorksheetFunction.VLookup(CLng(Me.TextBox1), wb.sht1.Range("A2:G835"), 2, 0) '<<-- Error appears here...
.TextBox3 = Application.WorksheetFunction.VLookup(CLng(Me.TextBox1), wb.sht1.Range("A2:G835"), 3, 0)
.TextBox4 = Application.WorksheetFunction.VLookup(CLng(Me.TextBox1), wb.sht1.Range("A2:G835"), 4, 0)
.TextBox5 = Application.WorksheetFunction.VLookup(CLng(Me.TextBox1), wb.sht1.Range("A2:G835"), 5, 0)
.TextBox8 = Time()
End With
End Sub
Last edited: