#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Error 1004

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Error 1004

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why am i getting an error 1004?? please help SAM SEBAIHI Excel Discussion (Misc queries) 2 February 16th 07 02:21 AM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
Runtime error '1004' General ODBC error star_lucas New Users to Excel 0 August 29th 05 04:09 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
VBA error - run-time error '1004': Romanian37 Excel Programming 3 May 21st 04 03:25 PM


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"