Open gkuenzli opened 7 years ago
Let a VBA project include a module called VbaDeveloperConfig specially dedicated to the configuration of VbaDeveloper. In order to avoid any conflict with the code of the hosting project, the configuration shall be written with comment lines exclusively.
The syntax for defining the value of an attribute in the configuration module is:
' <attribute> = <value>
If <value>
is a string, quotation marks may be used to specify the data.
Allows to define the folder used for export/import operations. The specified path is relative to the path of the project. The path may include the name or file name of the project.
Attribute name: RelativeSourcePath
Value type: String
Project name: %ProjectName%
The name of project as defined in the VBE.
Project file name: %FileName%
The file name (including extension) of the document hosting the VBProject.
' RelativeSourcePath = src\%FileName%
Some files (hence some VBComponents) may be ignored by the export/import operations. Create one command line per ignored file. As a value, specify the file name (including extension) that the ignored module would have in the exported directory. Do not include path.
Attribute name: Ignore
Value type: String
Nothing is ignored by default.
' Do not handle Module1, it contains a recorded macro
' Ignore = Module1.bas
' Forget about UserForm1, this is for internal testing only
' Ignore = UserForm1.frm
Define the EventListner behaviour. Set if code must be imported right after project is opened.
Attribute name: ImportAfterOpen
Value type: Boolean
' ImportAfterOpen = True
Define the EventListner behaviour. Set if code must be formatted before the project is saved.
Attribute name: FormatBeforeSave
Value type: Boolean
' FormatBeforeSave = True
Define the EventListner behaviour. Set if code must be exported after the project has been successfully saved.
Attribute name: ExportAfterSave
Value type: Boolean
' ExportAfterSave = True
It would be nice to have some mechanism allowing to store a vbaDeveloper configuration, hence some attributes, in every VBA project. This might allow for instance to customize the import/export directory and specify some modules to ignore.