Loads a classic XLS VBA OLE storage payload from a compound file. The
source file must contain either _VBA_PROJECT_CUR or
_VBA_PROJECT as a top-level storage. The method replaces any
VBA payload already attached to the workbook
Return value
'C:\Reports\MacroPayload.ole' Workbook.SaveAs(
Workbook.LoadVBAProjectFromFile(
'C:\Reports\MacroPayload.ole' 1 when the payload is loaded; returns a negative
value if the file cannot be opened or does not contain a supported VBA
storage
Workbook.SaveAs(
if Workbook.LoadVBAProjectFromFile('C:\Reports\MacroPayload.ole') = 1 then
Workbook.SaveAs('C:\Reports\MacroWorkbook.xls', xlExcel97);
'C:\Reports\MacroWorkbook.xls'