Inserting VBA code...
Kris wrote:
I found something.
.CodeName return empty string when vba is closed, and a name of sheet
when VBA is open.
So, next question.
Why .CodeName which is a actual value of parameter to function listed
above doesn't work with VBA closed.
I like to write to myself.
I found the problem.
CodeName property is not set if VBA is not open at least once.
it is done by design in Excel.
This lines of code solve the problem.
Dim vbp As Object
Set vbp = ActiveWorkbook.VBProject
|