Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA sldw type library

Status
Not open for further replies.

Eurobum

Aerospace
Aug 20, 2001
27
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.
 
Replies continue below

Recommended for you

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
 
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.
 
VBSpawn has it - sounds like the diff between early & late binding. Define your variables explicitly and it should enable the auto member list.
 
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.
 
Could be a problem with your Office install. Does the vba editor work right in Excel, Word, etc?
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor