×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

run time error 1004

run time error 1004

run time error 1004

(OP)
All,
sometimes people are forgetful...

a run time error 1004, autofilter method of range class failed is received.

i believe that the error problem is due to not referencing the correct library.  does anyone have any recommendations as to the correct reference library to refer to or other suggestions?

The following code is attached to an activex combination box, placed in a worksheet named Sheet1.

This code works for other pc's, but not this one.

Appreciate your suggestions/recommendations.

Private Sub EquipmentDescription_Change()
    Selection.AutoFilter Field:=1, Criteria1:="X"
End Sub

-pmover

RE: run time error 1004

pmover,

I think you are on the right track.  I would would select Tools / References from the VBA Editor menu and see which libraries are checked.  Compare this on a computer where the combo box function works vs. where it doesn't.  This should point you to the missing library.

RE: run time error 1004

(OP)
All,

msmith, thanks for the response.

an update, the pc's in question have different versions of excel (97 and 2000).  the code and action performs as programmed on pc with version 2000 and not as programmed on pc with version 97.

in checking the references on both pc's, the descriptions are identical, but the version numbers are different.  the 2000 version has the more updated version.

i've enhanced the code to include selecting the filter range, autofilter, and then setting the filtering criteria on the pc with version 97 and it performs well.  but this is a bastard way of accomplishing the task with user's having different versions of excel.

anyone explain why the one-line of code performs well with 2000 version of excel and not for version 97?  recommended corrective action or an alternative is appreciated as well.
-pmover

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close