• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run Time Error 1004. Unable to get the vlookup property of the worksheet

ThrottleWorks

Excel Ninja
Sir I am getting following error in the code.


Run Time Error 1004.

Unable to get the vlookup property of the worksheet function class


The code was running fine for the last one month.

The code is populating a vlookup, the base values are present in both the files.

I am not able to understand the reason behind bug.


Can anyone please help me in this.


I have also provided link for the original query which was resolved.

http://chandoo.org/forums/topic/vlookup-used-in-a-loop-not-working-after-first-2-instanes
 
Sachinbizboy


You have been a member here for nearly 18 months


You should know that you have provided us no, information with which to help you solve the problem


You haven't told us what has changed, What formula your using, what values cause the problem.


Can I please ask that you read the Rules: http://chandoo.org/forums/topic/phd-forum-posting-rules-etiquette-pls-read-before-posting
 
Hui Sir apologies for my error, I agree this is a mistake.


I am getting bug while running following loop.


I have 2 different files, I am populating vlookup from book A to Book B.

The loop rans for 5 or 6 rows then it thros bug, it is not giving bug at the start.


The base value is present in both the files but still macro is generating bug.

Everything is same, input files, formula.

[pre]
Code:
Dim ClNum As Long
ClNum = 86
For Each rn In rng
MyVal = rn.Row
If rn.Value <> "" Then
Cells(MyVal, 9).Value = Application.WorksheetFunction.VLookup(rn, rng2, ClNum, 0)
End If
Next
[/pre]
Apologies once again, please let me know if I need to provide more information.


Have a nice day.
 
Sir, sorry for late reply, I was on leave for 2 days, will check it now & share the results.


Have a nice day, thanks a lot for the help.
 
Back
Top