Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-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
Joined
Aug 17, 2020
Messages
13
Location
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.

 
You could read an external text file with all that data?
Or ask for the input whilst running the code?

regards,
LWolf
 
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.

Part and Inventory Search

Sponsor

Back
Top