Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi.
The error 1004 message (imposible to get the VLookup property of the WorksheetFunction class) appears when the debugger reaches the next line: Worksheets("graf").Range("E15").Value = Application.WorksheetFunction.VLookup(numero, refa, 147, falso) I've declared: Dim numero As Integer Dim refa As Range Set refa = Worksheets("refa").Range("A1:EP229") numero = Val(frmConsulta.cboNo.Value) Any idea? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think you set the lookup value in the vlookup command wrong.
You are asking it to find the data in column 147 Yet your data range only goes to EP which is column number 146 You will need to select the correct column for the data to look up. Vlookup(this value, range, value to return, 1 or 0) "John" wrote in message ... Hi. The error 1004 message (imposible to get the VLookup property of the WorksheetFunction class) appears when the debugger reaches the next line: Worksheets("graf").Range("E15").Value = Application.WorksheetFunction.VLookup(numero, refa, 147, falso) I've declared: Dim numero As Integer Dim refa As Range Set refa = Worksheets("refa").Range("A1:EP229") numero = Val(frmConsulta.cboNo.Value) Any idea? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
why am i getting an error 1004?? please help | Excel Discussion (Misc queries) | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
Runtime error '1004' General ODBC error | New Users to Excel | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
VBA error - run-time error '1004': | Excel Programming |