Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

“rumtine error 1004”

Posted on 2006-06-12
3
Medium Priority
?
233 Views
Last Modified: 2008-03-04
I am adding this piece of code to this sub.  I have three combo boxes, the second and third  is dependant on the first one.  After you pick you choice in the second one, I need to go do a vlookup but I could this error.  

“rumtine error 1004”
“Unable to get the vlookup property of the Worksheet Function class”

I tried this piece just on one combo box and it works.  

Any help would be appreciated!



Worksheets("Sheet22").Range("R20") = WorksheetFunction.VLookup(cboSecondary.Value, Sheets("data").Range("B3:G6"), 15, False)
End Sub
////////////////////////////////////////////////////////////


Private Sub cboSecondary_Change()
Dim mysheet As Worksheet
Set mysheet = ActiveSheet


Application.EnableEvents = False
mysheet.Unprotect
Sheet22.Range("x28:x57") = cboSecondary.Value 'Copy Delivery Date Column X
Application.EnableEvents = True

Worksheets("Sheet22").Range("R20") = WorksheetFunction.VLookup(cboSecondary.Value, Sheets("data").Range("B3:G6"), 15, False)
End Sub
0
Comment
Question by:ca1358
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
mvidas earned 2000 total points
ID: 16887379
Hi ca1358,

Your vlookup formula is requesting to return the 15th column in the lookup range, but the lookup range is only B3:G6 which is only 6 columns wide.  Thats why the error is occurring, what column are you looking to return from the "Data" sheet?

Matt
0
 

Author Comment

by:ca1358
ID: 16887871
Thank you!
0
 
LVL 35

Expert Comment

by:mvidas
ID: 16887900
Glad to help! Please let me know if you need anything else
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question