VbaModuleCollection
Contents
[
Hide
]VbaModuleCollection class
Represents the list of VbaModule
class VbaModuleCollection;
Methods
| Method | Description |
|---|---|
| get(number) | Gets VbaModule in the list by the index. |
| get(string) | Gets VbaModule in the list by the name. |
| addDesignerStorage(string, Uint8Array) | |
| getDesignerStorage(string) | Represents the data of Designer. |
| add(Worksheet) | Adds module for a worksheet. |
| add(VbaModuleType, string) | Adds module. |
| addUserForm(string, string, Uint8Array) | Inser user form into VBA Project. |
| remove(Worksheet) | Removes module for a worksheet. |
| remove(string) | Remove the module by the name |
get(number)
Gets VbaModule in the list by the index.
get(index: number) : VbaModule;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | number | The index. |
Returns
get(string)
Gets VbaModule in the list by the name.
get(name: string) : VbaModule;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of module. |
Returns
addDesignerStorage(string, Uint8Array)
addDesignerStorage(name: string, data: Uint8Array) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | |
| data | number[] |
getDesignerStorage(string)
Represents the data of Designer.
getDesignerStorage(name: string) : Uint8Array;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string |
Remarks
We do not support to parse them. Just only for copying.
add(Worksheet)
Adds module for a worksheet.
add(sheet: Worksheet) : number;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheet | Worksheet | The worksheet |
add(VbaModuleType, string)
Adds module.
add(type: VbaModuleType, name: string) : number;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| type | VbaModuleType | The type of module. |
| name | string | The name of module. |
addUserForm(string, string, Uint8Array)
Inser user form into VBA Project.
addUserForm(name: string, codes: string, designerStorage: Uint8Array) : number;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of user form |
| codes | string | The codes for the user form |
| designerStorage | number[] | the designer setting about the user form |
remove(Worksheet)
Removes module for a worksheet.
remove(sheet: Worksheet) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheet | Worksheet | The worksheet |
remove(string)
Remove the module by the name
remove(name: string) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string |