ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Why do I get VLookup error 1004 (https://www.excelbanter.com/excel-discussion-misc-queries/260088-why-do-i-get-vlookup-error-1004-a.html)

KenG

Why do I get VLookup error 1004
 
After defining a new Name ("_year") in my worksheet, I find that my makro
code (Private Sub cmdNewEntry744_Click()
With NewEntries
..Show
End With
End Sub)
can no longer open my dialog box. I get a runtime error 1004 a message
refering to VLookup property of Workbook function class.
The name "_year" refers to "=If(month="JAN.";R[-1]C + 1; R[-1]C)".

WhatIdo??

KenG

Joe User[_2_]

Why do I get VLookup error 1004
 
"KenG" wrote:
After defining a new Name ("_year") in my worksheet,

[....]
I get a runtime error 1004 a message refering to VLookup
property of Workbook function class.
The name "_year" refers to "=If(month="JAN.";R[-1]C + 1; R[-1]C)".


I presume you mean WorksheetFunction.VLookup.

It is unclear exactly how you are trying to refer to the Excel defined name.
You should show us a code snippet.

But in any case, I can imagine that WorksheetFunction.VLookup cannot
reference an Excel defined name.

I would use the Evaluate function. I cannot be more specific because you
were not more specific.


----- original message -----

"KenG" wrote in message
...
After defining a new Name ("_year") in my worksheet, I find that my makro
code (Private Sub cmdNewEntry744_Click()
With NewEntries
.Show
End With
End Sub)
can no longer open my dialog box. I get a runtime error 1004 a message
refering to VLookup property of Workbook function class.
The name "_year" refers to "=If(month="JAN.";R[-1]C + 1; R[-1]C)".

WhatIdo??

KenG



Don Guillett[_2_]

Why do I get VLookup error 1004
 
As ALWAYS, post YOUR code for comments.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"KenG" wrote in message
...
After defining a new Name ("_year") in my worksheet, I find that my makro
code (Private Sub cmdNewEntry744_Click()
With NewEntries
.Show
End With
End Sub)
can no longer open my dialog box. I get a runtime error 1004 a message
refering to VLookup property of Workbook function class.
The name "_year" refers to "=If(month="JAN.";R[-1]C + 1; R[-1]C)".

WhatIdo??

KenG




All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com