There is no automation involved.

This is all being done directly from Excel. No other development platform is being used.
I am not sure if I understand what you mean...

The above code is a part of excel i.e vba excel...