Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

CATIA VB Project Runtime ERROR 2

Status
Not open for further replies.

Ian Cuz

Aerospace
Dec 6, 2017
18
Similar to thread560-473903

I have had one of my CATVBA Projects stop working with "Compile error: Can't find Project or library"

My code initially highlights the line where I set a String Variable but when I add a Dim statement the code fails
at the Ucase() I have applied to the manual inputbox

I have not run this code for a little while and have not modified it and was working fine the last time.

I am on Windows 7 CATIA R21 and the only major update I have done recently was to install Office 2016 over the top of Office 2007
but I am sure it worked even after that - but no longer.

I'm a designer dabbling with coding but this is very confusing and frustrating

Can anyone shed any light on what may be happening

Many thanks in advance :)
 
Replies continue below

Recommended for you

Office updates installs newer VBA versions which may cause compatibility issues for .catvba projects.

Try re-installing VBA supplied with CATIA distributive.
 
check also tools-references in the vba editor. look for any warning triangles--those references cannot be found and you should untick them (but only those with warnings, leave all other alone...)

regards,
LWolf
 
Hi Guys
I looked at the references and all seemed ok
I found the vba6.msi and ran the install
But unfortunately neither of these seem to have resolved my issue

I have searched the web and found an article related to a Microsoft Security Patch which affected vba
but it was from way back - although now that win7 is totally out of support - I am wondering if a more recent patch
could have created a similar fault

Many thanks again for the help above
 
Hi All
Just a little update
I eventually got my issues resolved by deleting and re linking all the References
I.e. all the tlb files from the Program Files ......code\bin folder

Thanks for all the hints 😁👍
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor