• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class ModuleCollection

Collection class for VBA modules

Inheritance
object
ModuleCollection
Implements
IEnumerable<Module>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Presentation.Vba
Assembly: DRIT.Presentation.dll
Syntax
public class ModuleCollection : IEnumerable<Module>, IEnumerable

Properties

Count

Gets the number of items in this collection.

Declaration
public int Count { get; }
Property Value
Type Description
int

this[int]

Gets or sets the value associated with this object.

Declaration
public Module this[int index] { get; }
Parameters
Type Name Description
int index
Property Value
Type Description
Module

this[string]

Gets or sets the value associated with this object.

Declaration
public Module this[string name] { get; }
Parameters
Type Name Description
string name
Property Value
Type Description
Module

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 document to this object.

Declaration
public Module AddDocument(string name, bool @public)
Parameters
Type Name Description
string name

The name assigned to the object.

bool public
Returns
Type Description
Module

The newly added document.

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

Contains(string)

Returns true if a module with the specified name exists in the collection.

Declaration
public bool Contains(string name)
Parameters
Type Name Description
string name
Returns
Type Description
bool

GetEnumerator()

Returns an enumerator that iterates through this collection.

Declaration
public IEnumerator<Module> GetEnumerator()
Returns
Type Description
IEnumerator<Module>

An enumerator that iterates through this collection.

Remove(Module)

Removes the specified module from the collection.

Declaration
public bool Remove(Module module)
Parameters
Type Name Description
Module module

The module to remove.

Returns
Type Description
bool

true if the module was found and removed; otherwise false.

Remove(string)

Removes the module with the specified name from the collection.

Declaration
public bool Remove(string name)
Parameters
Type Name Description
string name

The name of the module to remove.

Returns
Type Description
bool

true if the module was found and removed; otherwise false.

Implements

IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX