Program Structure - Moosevellous/Trace GitHub Wiki
Trace is built to be expanded by anyone. If you want to do this, it's probably a good idea to have a look at the various modules in the code and make sure you're putting it all in the right place.
All buttons are in groups on the Ribbon. The name of group should match with the name of the module in which it sits. At the moment the groups are:
- Load
- Import
- Row Operations
- Noise
- Curves
- SWL Estimation
- Vibration
- Sheet Tools
- Format / Style
- Help
Additionally, there is a module called Ribbon Functions
which holds all of the callbacks for the buttons on the ribbon.
Here's how all the modules should connect:
In general, the sequence of events from a user clicking a button on the ribbon is as follows:
- User clicks button on Ribbon – linked macro (
Sub btnCustomFunction()
) inRibbonControl
module begins. - Macro in
RibbonControl
passes the named range SheetType toSub CustomFunction()
. - Sub checks for valid row range using
CheckRow()
.
OPTIONAL FORM STAGE (steps 4 to 6)
- Sub
CustomFunction()
calls the custom formfrmFunctionName
. - User inputs into fields in custom form
frmFunctionName
. - Code within custom form places data in public variables for use by
Sub CustomFunction()
.
- Sub
CustomFunction()
writes formula description. - Sub
CustomFunction()
merges or unmerged parameter column and applies validation. - Sub
CustomFunction()
writes formula in leftmost cell of template; including call of GetCustomFunction(). - Sub
CustomFunction()
extends formula to range using functionExtendFunction(SheetType)
.