Exporting VBProject Properties from Spreadsheet

hicksi

Board Regular
Joined
Mar 5, 2012
Messages
203
I have THREE different spreadsheets, all using some common UserForms and Modules. (actually, there's 6, but that's unimportant as the extra 3 are TEST versions with the same code but different data)
I have the Export script that's around in many places that will export all forms, classes and modules to text (so I can put them into Code Library). I have even extended this so it exports the FRX to text by rolling through the properties. THAT allows me to monitor when the positioning of the controls moves.

The three spreadsheets are controlled by both Conditional-Compile code in some forms (that restrict the frames and tabs in the View-Only copy of the form), and by Conditional-Compile code in the PROJECT of each.
It effectively allows me to define the code so that there is a FULL version, a VIEW version (containing only 30% if the forms) and another version that views the data from a different aspect (customers instead of products)

My problem is that I cannot figure out how to export the project details (ie the project conditional-compile parts) to text so I can load them to the Code Library.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Would you be able to provide some code sample and the conditional-compile parts. At the moment I am not sure what exactly you're after?
 
Upvote 0
Sorry, I may be confusing in how I describe the problem.
It's not the CODE that I'm worried about. I already have that.
But somewhere in the internals of the VBProject is the place where the window:
1629761156197.png

is saved. In another spreadsheet, the conditional compiler arguments are different.
I want to read these values so I can write them to file and store them in the code library
 
Upvote 0
How about adding those conditional compilation constants as code comments in the ThisWorkbook Module, temporarly export the module and then parse the exported module text and retrieve them.
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,397
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top