Vlookup a date in a textbox within UserForm - VBA

Cakz Primz

Board Regular
Joined
Dec 4, 2016
Messages
102
Office Version
  1. 365
Platform
  1. Windows
Guys,

I need to lookup weekending date based on a textbox value in a userform
The code I have gave me a debug error message as follow "Unable to get the Vlookup properlty of the worksheet function class" When I disable "On Error Resume Next"

The lookup value, Arg1 is a textbox named = ProgressDate
Table is array on another sheet in the same file, Arg2, worksheet name = prima
Col_Index_Num, Arg3 = 2

Below is the code:
VBA Code:
Private Sub ProgressDate_Change()
    'On Error Resume Next
    ProgressDay.Value = Format(ProgressDate.Value, "DDDD")
    Me.WeekEnding.Value = WorksheetFunction.VLookup(Me.ProgressDate.Value, Worksheets("prima").Range("GE3:GG5000"), 2, False)
    Me.WeekEnding.Value = Format(WeekEnding.Value, "dd-mmm-yyyy")
End Sub

Hope that someone in this forum could help me.
Thank you very much

prima - Indonesia
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Code:
WorksheetFunction.VLookup(Me.ProgressDate.Value, Worksheets("prima").Range("GE3:GG5000"), 2, False)

Me.ProgressDate.Value should be Me.ProgressDay.Value

???
 
Upvote 0
Code:
WorksheetFunction.VLookup(Me.ProgressDate.Value, Worksheets("prima").Range("GE3:GG5000"), 2, False)

Me.ProgressDate.Value should be Me.ProgressDay.Value

???
Dear bebo021999,

Me.ProgressDay is the weekday (Sunday, Monday, etc) based on Me.ProgressDate
I need to get the WeekEnding everytime the Me.ProgressDate is changing

Thank so much for your assistant.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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