How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask John D Your Own Question

John D
John D, Bachelor's Degree
Category: Microsoft Office
Satisfied Customers: 9659
Experience:  Bachelor of Science - Engineering Consultant
53785
Type Your Microsoft Office Question Here...
John D is online now
A new question is answered every 9 seconds

Getting error 1004 Unable to get the VLookup property of the

Customer Question

Getting error 1004 Unable to get the VLookup property of the WorksheetFunction class on macro that has worked for a long time. Recently came to this firm and there's no documentation as to the macros. Staff enter data for txtCap, txtRecall, txtClosed and then the lookup is supposed to enter additional information from another sheet but error appears when they click to add the data to the sheet.

Private Sub cmdAdd_Click()
Dim RowCount As Long
Dim ctl As Control

' Check input
If Me.txtCLOSED.Value = "" Then
MsgBox "Please scan/enter the Matter number barcode.", vbExclamation, "Closed Files"
Me.txtCLOSED.SetFocus
Exit Sub
End If

' Add data to worksheet
RowCount = Worksheets("ClosedFiles").Range("A1").CurrentRegion.Rows.Count
With Worksheets("ClosedFiles").Range("A1")
.Offset(RowCount, 0).Value = Me.txtSTORAGEDATE.Value
.Offset(RowCount, 1).Value = Me.txtCAP.Value
.Offset(RowCount, 2).Value = Me.txtRECALL.Value
.Offset(RowCount, 3).Value = Me.txtCLOSED.Value

.Offset(RowCount, 4).Value = Application.WorksheetFunction.VLookup(txtCLOSED.Value, Range("EliteData"), 83, False)
.Offset(RowCount, 5).Value = Application.WorksheetFunction.VLookup(txtCLOSED.Value, Range("EliteData"), 2, False)
.Offset(RowCount, 6).Value = Me.txtDATECLOSED.Value
.Offset(RowCount, 8).Value = Application.WorksheetFunction.VLookup(txtCLOSED.Value, Range("EliteData"), 15, False)
If checkDND = True Then _
.Offset(RowCount, 7).Value = "Wills-DND"
End With

' Clear form
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Or TypeName(ctl) = "ComboBox" Then
ctl.Value = ""
' ElseIf TypeName(ctl) = "CheckBox" Then
' ctl.Value = True

End If
Next ctl
Me.txtRECALL.SetFocus

End Sub
Submitted: 1 year ago.
Category: Microsoft Office
Expert:  NewITZone replied 1 year ago.

NewITZone :

Hi, Welcome to JustAnswer. This is Mahbub Shahin can assist you.
Please let me know when you will be ready?

Customer:

ready now

NewITZone :

Please run the file

NewITZone :

You can ignore the error with On Error Resume Next.

Customer:

sorry, what file?

NewITZone :

I mean the spreadsheet

Customer:

Okay I did - got the same error. Didn't get On Error Resume Next.

NewITZone :

Could you please send me the file

Customer:

Did you get it?

NewITZone :

no.

NewITZone :

Please upload here

Customer:

I tried using the paperclip to attach but clicking OK doesn't attach

NewITZone :

www.wikisend.com

NewITZone :

Click on the link then upload the file and send me the link

NewITZone :

Now I am out side my home.

NewITZone :

The speed is not too fast

Customer:

It appears English is not your first language - do you mean you are not able to work on my issue at the moment because it is slow to upload the file?

NewITZone :

No sir.

NewITZone :

Actually my download speed is slow currently.

NewITZone :

I am apologize. I opt out and leave this question for other experts.

NewITZone :

Please do not rate me.

NewITZone :

Please rate the person who solve your problem.

NewITZone :

Thank you.

Expert:  John D replied 1 year ago.
Hi, I will try to help you with this question. Please let me know when you're back online so we can start the session
Customer: replied 1 year ago.


I'm here!


 

Expert:  John D replied 1 year ago.
Ok I checked that part of the code and it looks ok.

Could you start the macro and type 137283 in the "CLOSED File barcode" field then click the Add Closed file button

Let me know what happens
Customer: replied 1 year ago.


That worked fine.

Expert:  John D replied 1 year ago.
There you go. Apparently you have been entering in that field codes that do not exist


If you have any further questions do not hesitate to ask, and please don't forget to rate my solution "Excellent" or "Good" if I was able to help

Thanks
Customer: replied 1 year ago.


Have discussed with assistant who actually uses this and NOW she says she's been ignoring an error when the file first opens


 


Sub GetFreshData()


Worksheets("Data").Visible = xlSheetVisible


Worksheets("Data").Activate


ActiveWorkbook.RefreshAll


Worksheets("Data").Visible = xlSheetInvisible


End Sub


 


It stalls at xlSheetInvisible - and error is Can't find project or library

Expert:  John D replied 1 year ago.

Ok that is really a different question. Please go ahead and rate my answer which has addressed the VLOOKUP error that you have initially asked so I can get credit for my time.

Thanks

 

 

*** RATING REQUIRED ***

John D, Bachelor's Degree
Category: Microsoft Office
Satisfied Customers: 9659
Experience: Bachelor of Science - Engineering Consultant
John D and other Microsoft Office Specialists are ready to help you
Expert:  John D replied 1 year ago.

Thanks

 

In the above code try replacing

xlSheeVisible with TRUE

and

xlSheetInvisible with FALSE

 

 

Customer: replied 1 year ago.


Already did that - doesn't work.


Fixed it myself.

Expert:  John D replied 1 year ago.
Glad you got that error fixed.

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
 
 
 

Meet The Experts:

 
 
 
  • jstinehelfer

    Information Systems Manager

    Satisfied Customers:

    36
    A+ Comptia Certified computer repair
< Last | Next >
  • http://ww2.justanswer.com/uploads/JS/jstinehelfer/2012-6-6_215146_Pictureofme1.64x64.png jstinehelfer's Avatar

    jstinehelfer

    Information Systems Manager

    Satisfied Customers:

    36
    A+ Comptia Certified computer repair
  • http://ww2.justanswer.com/uploads/JA/JasonJames122/2011-12-16_135647_jasonjamesheadshotweb.64x64.jpg JasonJames122's Avatar

    JasonJames122

    Computer Enthusiast

    Satisfied Customers:

    0
    I manage all information systems (network of Windows PC's and servers with Microsoft Office products) for a small business
  • http://ww2.justanswer.com/uploads/JE/jessmagz/2012-6-6_18129_jm.64x64.jpg Jess M.'s Avatar

    Jess M.

    Computer Support Specialist

    Satisfied Customers:

    301
    Computer Software Specialist for more than 10 years
  • http://ww2.justanswer.com/uploads/CH/chutz747/2011-11-6_14231_me.64x64.jpg The-PC-Guy's Avatar

    The-PC-Guy

    Computer Manager

    Satisfied Customers:

    274
    20 years experience providing remote computer support
  • http://ww2.justanswer.com/uploads/SP/spherrod/2012-6-6_174244_1000852.64x64.JPG Steve Herrod's Avatar

    Steve Herrod

    Computer Support Specialist

    Satisfied Customers:

    125
    Trained in Microsoft Office from 2000 through to latest version 2010.
  • http://ww2.justanswer.com/uploads/SE/Seashore2011/2011-12-6_33418_111205223015.64x64.jpg Chris L.'s Avatar

    Chris L.

    Support Specialist

    Satisfied Customers:

    124
    Certified Expert with over 10 years experience.
  • http://ww2.justanswer.com/uploads/KR/krkljatorm/2012-6-24_153417_ITMiro.64x64.jpg IT Miro's Avatar

    IT Miro

    Computer Scientist

    Satisfied Customers:

    97
    Bachelor's Degree in Information Technology, Microsoft Certified Professional
 
 
 

Related Microsoft Office Questions

Chat Now With A Microsoft Office Technician
John D
John D
385 Satisfied Customers
Bachelor of Science - Engineering Consultant