×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

Macro Troubleshooting

Macro Troubleshooting

Macro Troubleshooting

(OP)
I downloaded a renaming macro (thanks, fcsuper!), that won't work on my machine. I get an error message telling me that I have a Compile error, Can't find project or library. Unfortunately, I'm a complete moron when it comes to VB...if anyone can shed some light on this, it would be greatly appreciated.

Jeff Mirisola, CSWP, Certified DriveWorks AE
http://designsmarter.typepad.com/jeffs_blog

RE: Macro Troubleshooting

I'm not sure about the "project" aspect, but the libraries can be set when editing the macro via Tools > References. Just select the libraries which match your SW version.  

cheers

RE: Macro Troubleshooting

Most likely you have a reference issue caused by the macro being created in a different version from the one you are running.  In the VBA editor, go to Tools->References.  In the list there will probably be a few checked entries that say "MISSING:______".  Un-check those and find the corresponding entries in the list for your current version of SW and check those boxes.   

-handleman, CSWP (The new, easy test)

RE: Macro Troubleshooting

(OP)
Handleman,
I found one instance of "Missing:" but I can't find any corresponding entries. If I deselect the missing one and rerun the macro, I get another error message that, to me, implies that the User Form is missing.
Also, if I shut down SW and restart, when I initially run the macro I get an Microsoft Forms error stating: 'Could not load object because it is not available on this machine.'

Thoughts?

Jeff Mirisola, CSWP, Certified DriveWorks AE
http://designsmarter.typepad.com/jeffs_blog

RE: Macro Troubleshooting

JMirisola,
Rename.swp was built using a library reference to something called "Microsoft Masked Edit control 6.0". This or an older version does not appear in my reference library either. - Maybe it is from the Vista operating system. I'm still using XP. How about you?

Just my guess smile .

Tobin Sparks
www.nov.com

RE: Macro Troubleshooting

(OP)
I'm still using XP as well. I've looked around for the msmask32.ocx file and it's not on my system, nor have I been able to find a reputable site to download it from.  

Jeff Mirisola, CSWP, Certified DriveWorks AE
http://designsmarter.typepad.com/jeffs_blog

RE: Macro Troubleshooting

(OP)
Ok, got it. Too bad the damn macro still won't work. I still get a compile error: can't find project or library. banghead

Jeff Mirisola, CSWP, Certified DriveWorks AE
http://designsmarter.typepad.com/jeffs_blog

RE: Macro Troubleshooting

(OP)
I'm getting closer, but still no dice. I don't know that there's anything too wrong with the macro, Matt. I don't know enough about VB to determine that.

Jeff Mirisola, CSWP, Certified DriveWorks AE
http://designsmarter.typepad.com/jeffs_blog

RE: Macro Troubleshooting

Ah, you'll still have to tell SW where that OCX file is.  You can do this by going to the References dialog, selecting the missing reference, and clicking Browse and browsing to the location.  Unfortunately, when you first open the macro, the actual box on the form that is created based on the reference disappears because SW has no idea how to make it.  What worked for me was:

1. Download the OCX file
2. Tools->References and brows to the OCX's location
3. Save the macro
4. Try to run the macro and get "can't find..." error
5. Re-download macro from Jeff's attachment and run it.

Not saying every step there was actually necessary, that's just how it unfolded on my end.

 

-handleman, CSWP (The new, easy test)

RE: Macro Troubleshooting

(OP)
I tried your method, handleman, with no luck. I give up...I'm going to have to figure out a different way to rename all the files...

Jeff Mirisola, CSWP, Certified DriveWorks AE
http://designsmarter.typepad.com/jeffs_blog

RE: Macro Troubleshooting

(OP)
Ok, I'm feeling pretty dumb right now. My whole reason for the macro was due to the fact that I needed to change the names of imported parts (import1, import2, etc) to a more unique name as I have multiple imported sub-assemblies that would have common part names. When bringing the sub-assemblies into an upper-level assembly, all the common names would default to the first opened instance even though the parts were different.
The solution was in front of my face the whole time. Do a 'save-as' on the sub-assembly, select references, highlight the parts, select options, add prefix.
Is it Friday yet?

Jeff Mirisola, CSWP, Certified DriveWorks AE
http://designsmarter.typepad.com/jeffs_blog

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!


Resources