Run-Time Error 438 Object Doesn't Support this property

FuNeS13

Board Regular
Joined
Oct 25, 2016
Messages
160
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. Mobile
  3. 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:
Glad to help & thanks for the feedback.

I'd recommend you use Dante's code as it only looks for the value once, rather than multiple times.
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,214,819
Messages
6,121,746
Members
449,050
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top