Class ModuleCollection
Collection class for VBA modules
Inherited Members
Namespace: DRIT.Spreadsheet.Vba
Assembly: DRIT.Spreadsheet.dll
Syntax
public class ModuleCollection : IEnumerable<Module>, IEnumerable
Properties
Count
Reports the number of items currently held by ModuleCollection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int | The count returned by the operation. |
this[int]
Provides indexed access to values in the ModuleCollection.
Declaration
public Module this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Property Value
| Type | Description |
|---|---|
| Module | The this returned by the operation. |
this[string]
Provides indexed access to values in the ModuleCollection.
Declaration
public Module this[string name] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Property Value
| Type | Description |
|---|---|
| Module | The this returned by the operation. |
Methods
AddClass(string, bool)
Adds a new VBA class
Declaration
public Module AddClass(string name, bool @public)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the class |
| bool | public | Private or Public not createble |
Returns
| Type | Description |
|---|---|
| Module | The class object |
AddDocument(string, bool)
Adds the supplied document to the ModuleCollection.
Declaration
public Module AddDocument(string name, bool @public)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name used by the operation. |
| bool | public | The public used by the operation. |
Returns
| Type | Description |
|---|---|
| Module | The add document returned by the operation. |
AddModule(string)
Adds a new VBA Module
Declaration
public Module AddModule(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the module |
Returns
| Type | Description |
|---|---|
| Module | The module object |
GetEnumerator()
Retrieves the requested enumerator from the ModuleCollection.
Declaration
public IEnumerator<Module> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<Module> | The get enumerator returned by the operation. |