Hello
Thank you for your reply.
With regard to my item 1) the sub routine might be one of many within the module but may be quite complex. For example the routine may have several If/EndIf statements.
Specifically I am seeking to find out whether each If/EndIf statement should be passed separately to the compiler for compiling or whether the whole sub routine (i.e. all code) can be compiled in one go.
Additionally where UserForms are being used I presume the form is not compiled but you can compile the code behind it.
It’s up to you and what are the conditions for the If/endIf statements. Of course, If Then are supported by the VBA compiler.
No UserForm are not compiled, but you are right, you can compile portions of the VBA code behind them for instance.
The real goal of the VBA compiler is to move some vital parts of your VBA code to it, so that your Excel workbook will fail without the compiled VBA code if it somehow is extracted from the protection shell.
Okay I understand. As you mention “If Then” statements being supported is it fair to read into this that not all statements would be supported? In particular I am thinking of Arrays - which are probably the most sensitive for me.