×
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

VBA sldw type library

VBA sldw type library

VBA sldw type library

(OP)
Hi All,

I just uninstalled Soliworks 2005, completely cleaned the registry and directories. Then I installed Soliworks 2007.
Everything is fine until I wrote a small macro to test the VBA. Inside the VBA, the Ctrl+space and the browser work fine but I did not have the Auto Member list drop down after I type the .(dot).
I check the reference and here's the list by order:

1. Visual Basic For Applications.
2. Solidworks Extensibility Type Library.
3. OLE Automation.
4. SldWorks 2007 Type Library.
5. SolidWorks 2007 Constant Type Library.
6. SolidWorks 2007 Command Type Library.

They are all pointed to the right directories. I did move the priorities up and down but it did not help.

Also when I use MS-Excel VBA and add Solidworks Type Library in the reference, I could not see any response after the dot.

TIA.

RE: VBA sldw type library

Hi,
Maybe you need to check your VBA Editor Options.

On your first Option Tab must be something similar to 'List Elements' it should be checked ;o)

or you Declared your swApp as Object ?

cheers
Michael

RE: VBA sldw type library

(OP)
I did check all options and I did declare swApp as Object. I guess maybe the Windows Intelligent Sense got confused with something in my system.

RE: VBA sldw type library

Hi try this

Dim swApp As SldWorks.SldWorks


RE: VBA sldw type library

VBSpawn has it - sounds like the diff between early & late binding.  Define your variables explicitly and it should enable the auto member list.

RE: VBA sldw type library

(OP)
Thank you to all of you. I did have this line in my code.
Dim swApp As SldWorks.SldWorks but it did not help.
Maybe I have to cleanup my hard drive. I have so many things in there like Visual Studio, Sun Java, Eclipse etc...
I'll keep on looking though because I need those software in the system for an on-going project.

RE: VBA sldw type library

Could be a problem with your Office install.  Does the vba editor work right in Excel, Word, etc?

RE: VBA sldw type library

(OP)
Yes, vba is all right with the Office. I think I found the fix by first declaring everything with "Sldworks." then I have a drop down. Thanks handleman.

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