VbaModuleCollection

VbaModuleCollection class

Represents the list of VbaModule

class VbaModuleCollection;

Methods

MethodDescription
get(number)Gets VbaModule in the list by the index.
get(string)Gets VbaModule in the list by the name.
addDesignerStorage(string, number[])
getDesignerStorage(string)Represents the data of Designer.
add(Worksheet)Adds module for a worksheet.
add(VbaModuleType, string)Adds module.
addUserForm(string, string, number[])Inser user form into VBA Project.
remove(Worksheet)Removes module for a worksheet.
remove(string)Remove the module by the name
getCount()Gets the number of elements contained in.
isNull()Checks whether the implementation object is null.

get(number)

Gets VbaModule in the list by the index.

get(index: number) : VbaModule;

Parameters:

ParameterTypeDescription
indexnumberThe index.

Returns

VbaModule

get(string)

Gets VbaModule in the list by the name.

get(name: string) : VbaModule;

Parameters:

ParameterTypeDescription
namestringThe name of module.

Returns

VbaModule

addDesignerStorage(string, number[])

addDesignerStorage(name: string, data: number[]) : void;

Parameters:

ParameterTypeDescription
namestring
datanumber[]

getDesignerStorage(string)

Represents the data of Designer.

getDesignerStorage(name: string) : number[];

Parameters:

ParameterTypeDescription
namestring

Returns

number[]

Remarks

We do not support to parse them. Just only for copying.

add(Worksheet)

Adds module for a worksheet.

add(sheet: Worksheet) : number;

Parameters:

ParameterTypeDescription
sheetWorksheetThe worksheet

add(VbaModuleType, string)

Adds module.

add(type: VbaModuleType, name: string) : number;

Parameters:

ParameterTypeDescription
typeVbaModuleTypeThe type of module.
namestringThe name of module.

addUserForm(string, string, number[])

Inser user form into VBA Project.

addUserForm(name: string, codes: string, designerStorage: number[]) : number;

Parameters:

ParameterTypeDescription
namestringThe name of user form
codesstringThe codes for the user form
designerStoragenumber[]the designer setting about the user form

remove(Worksheet)

Removes module for a worksheet.

remove(sheet: Worksheet) : void;

Parameters:

ParameterTypeDescription
sheetWorksheetThe worksheet

remove(string)

Remove the module by the name

remove(name: string) : void;

Parameters:

ParameterTypeDescription
namestring

getCount()

Gets the number of elements contained in.

getCount() : number;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;