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

FuNeS13

Board Regular
Joined
Oct 25, 2016
Messages
161
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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,224,835
Messages
6,181,245
Members
453,026
Latest member
cknader

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