VbaModuleCollection Class
Represents the collection of Vba
- Inheritance:
- System.
Object VbaModule Collection
Properties
Count
Gets the number of elements contained.
Property Value
- System.
Int32
Item[ExcelWorksheet]
Gets the Vba
Parameters
worksheet
- Excel
Worksheet
The Excel
Property Value
Item[Int32]
Gets the Vba
Parameters
index
- System.
Int32
The zero-based index of the Vba
Property Value
Item[String]
Gets the Vba
Parameters
name
- System.
String
Name of the Vba
Property Value
Methods
Add(ExcelWorksheet)
Creates and returns a new Vba
Parameters
worksheet
- Excel
Worksheet
The worksheet to bind the module.
Returns
Add(ExcelWorksheet, String)
Creates and returns a new Vba
Parameters
worksheet
- Excel
Worksheet
The Excel
name
- System.
String
Name of the returning Vba
Returns
Add(String)
Creates and returns a new Vba
Parameters
name
- System.
String
Name of the returning Vba
Returns
Add(String, VbaModuleType)
Creates and returns a new Vba
If the given vbaModuleType
is Document, returning Vba
Parameters
name
- System.
String
Name of the returning Vba
vbaModuleType
- Vba
Module Type
Type of the returning Vba
Returns
AddCopy(VbaModule)
Clones and returns a new Vba
Parameters
Returns
Vba
If Type is Document and the corresponding Excel
Remarks
If Type is Document and the corresponding Excel
If Code exists in the Vba
Clear()
Removes all items from the collection.
Contains(ExcelWorksheet)
Indicates whether this collection contains the VbaexcelWorksheet
.
Parameters
excelWorksheet
- Excel
Worksheet
The Excel
Returns
- System.
Boolean
true if the collection contains an item bound to the excelWorksheet
; otherwise, false.
Contains(String)
Indicates whether this collection contains the Vbaname
.
Parameters
name
- System.
String
The name of the module to locate.
Returns
- System.
Boolean
true if the collection contains an item with the name
; otherwise, false.
GetEnumerator()
Returns an enumerator that iterates through the collection.
Returns
- System.
Collections. <VbaGeneric. IEnumerator Module >
A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.
Remove(VbaModule)
Removes the given Vba
Parameters
Remove(String)
Removes the Vba
Parameters
name
- System.
String
Name of the Vba
RemoveAt(Int32)
Removes the Vba
Parameters
index
- System.
Int32
The index of the Vba
TryGet(ExcelWorksheet, out VbaModule)
Tries to get the VbaexcelWorksheet
.
Parameters
excelWorksheet
- Excel
Worksheet
The Excel
Returns
- System.
Boolean
true if the collection contains an item that is bound to the excelWorksheet
; otherwise, false.
TryGet(String, out VbaModule)
Tries to get the Vbaname
.
Parameters
name
- System.
String
Name of the Vba
Returns
- System.
Boolean
true if the collection contains an item with the name
; otherwise, false.