chipsworld
Board Regular
- Joined
- May 23, 2019
- Messages
- 164
- Office Version
- 365
I am receiving a "Run Time Error 1004 - Unable to get the VLookup property if the WorksheetFunction" for the below, but not until the 3rd Vlookup runs. Values are in the lookup table, etc...Help! I don't understand why the first two run but not the third and fourth.
The only difference between the values is the first two are all text values and the second two are/can be alpha-numeric...
What am I missing?
The only difference between the values is the first two are all text values and the second two are/can be alpha-numeric...
What am I missing?
VBA Code:
Dim qcntry As String
Dim ccntry As String
Dim qusc As String
Dim cusc As String
Dim wslkup As Worksheet
Set wslkup = Sheets("formulas")
qcntry = Application.WorksheetFunction.VLookup(Me.cmbqcntry.Value, wslkup.Range("AB3:AC25"), 2, False)
ccntry = Application.WorksheetFunction.VLookup(Me.cmbccntry.Value, wslkup.Range("AB3:AC25"), 2, False)
qusc = Application.WorksheetFunction.VLookup(Me.cmbqusc.Value, wslkup.Range("AB3:AC25"), 2, False)
cusc = Application.WorksheetFunction.VLookup(Me.cmbcusc.Value, wslkup.Range("AB3:AC25"), 2, False)[/B]