Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

CATIA V5: Store file location/ values inside VBA macro

Status
Not open for further replies.

AlexMorasan

Automotive
Aug 17, 2020
13
0
0
MX
Hello everyone

Is there a way to store information inside a macro in VBA?
Last year I made a macro that stores all the viewpoints that we used to create an assembly manual for our client, I save this information in an Excel file. However, the location of this file is written inside the VBA code, so if someone would like to use my macro in a different project they would need to edit the code.
I would like to upgrade my code so the macro could be used in all the sites of my company without needing to edit the base code.
Does somebody know if there is a way the user could enter the basic imputs ( for example location of the file where the data is stored, the name of the project , etc) the first time they launch the macro? Is it possible to save these values inside the code or somewhere else?

If it is necessary I could present you part of my code.
Thanks in advance for your support and sorry for my bad English, it is not my native language.

 
Replies continue below

Recommended for you

Hi.

Obvious place to store settings on Windows is registry. And it seems like it is the way to go for you.

However, if you really need to share same settings across machines it is actually possible to edit .catvba project components via VBE object.
 
Status
Not open for further replies.
Back
Top