HotXLS-dokumentation

VBAProject egenskap

Returnerar a parsed TXLSVBAProject för en klassisk XLS-arbetsbok som innehåller VBA-lagring. Projektet exponerar antalet moduler och modulernas källtext via TXLSVBAModule items If the workbook has no VBA project, the property returns nil Use HasVBAProject / VBADefined to test for the raw payload, LoadVBAProjectFromFile and SaveVBAProjectToFile to move the preserved OLE storage payload, and ClearVBAProject to remove it from the workbook

Syntax

property VBAProject: TXLSVBAProject;

Exempel

Project := Workbook.VBAProject;
if Project <> nil then
  ModuleText := Project[1].SourceCode;

Se även