GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    VbaModuleCollection Class

    Namespace:
    GemBox.Presentation.Vba
    Assembly:
    GemBox.Presentation.dll

    Represents the collection of VbaModule.

    • C#
    • VB.NET
    public sealed class VbaModuleCollection : IEnumerable<VbaModule>, IEnumerable
    Public NotInheritable Class VbaModuleCollection
        Implements IEnumerable(Of VbaModule), IEnumerable
    Inheritance:
    System.Object
    VbaModuleCollection
    Implements
    System.Collections.Generic.IEnumerable<VbaModule>
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of elements contained.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    Item[Int32]

    Gets the VbaModule at the specified index.

    • C#
    • VB.NET
    public VbaModule this[int index] { get; }
    Public ReadOnly Property Item(index As Integer) As VbaModule
    Parameters
    index
    System.Int32

    The zero-based index of the VbaModule to get.

    Property Value
    VbaModule

    VbaModule that corresponds to the given index.

    Item[String]

    Gets the VbaModule with the given name.

    • C#
    • VB.NET
    public VbaModule this[string name] { get; }
    Public ReadOnly Property Item(name As String) As VbaModule
    Parameters
    name
    System.String

    Name of the VbaModule to get.

    Property Value
    VbaModule

    VbaModule that corresponds to the given name.

    Methods

    Add(String)

    Creates and returns a new VbaModule with the given name and with the type of Procedural.

    • C#
    • VB.NET
    public VbaModule Add(string name)
    Public Function Add(name As String) As VbaModule
    Parameters
    name
    System.String

    Name of the returning VbaModule.

    Returns
    VbaModule

    VbaModule that is created and added to the collection.

    Add(String, VbaModuleType)

    Creates and returns a new VbaModule with the given name and type.

    If the given vbaModuleType is Document, returning VbaModule will be bound to PresentationDocument.

    • C#
    • VB.NET
    public VbaModule Add(string name, VbaModuleType vbaModuleType)
    Public Function Add(name As String, vbaModuleType As VbaModuleType) As VbaModule
    Parameters
    name
    System.String

    Name of the returning VbaModule.

    vbaModuleType
    VbaModuleType

    Type of the returning VbaModule.

    Returns
    VbaModule

    VbaModule that is created and added to the collection.

    AddCopy(VbaModule)

    Clones and returns a new VbaModule from the given module.

    • C#
    • VB.NET
    public VbaModule AddCopy(VbaModule vbaModule)
    Public Function AddCopy(vbaModule As VbaModule) As VbaModule
    Parameters
    vbaModule
    VbaModule

    Source VbaModule to be cloned.

    Returns
    VbaModule

    VbaModule that is cloned and added to the collection.

    Clear()

    Removes all items from the collection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Contains(String)

    Indicates whether this collection contains the VbaModule object with the specified name.

    • C#
    • VB.NET
    public bool Contains(string name)
    Public Function Contains(name As String) As Boolean
    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.

    • C#
    • VB.NET
    public IEnumerator<VbaModule> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of VbaModule)
    Returns
    System.Collections.Generic.IEnumerator<VbaModule>

    A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.

    Remove(VbaModule)

    Removes the given VbaModule.

    • C#
    • VB.NET
    public void Remove(VbaModule vbaModule)
    Public Sub Remove(vbaModule As VbaModule)
    Parameters
    vbaModule
    VbaModule

    The VbaModule that will be removed from this collection.

    Remove(String)

    Removes the VbaModule by name.

    • C#
    • VB.NET
    public void Remove(string name)
    Public Sub Remove(name As String)
    Parameters
    name
    System.String

    Name of the VbaModule contained in the collection.

    RemoveAt(Int32)

    Removes the VbaModule from the given index.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The index of the VbaModule that will be removed.

    TryGet(String, out VbaModule)

    Tries to get the VbaModule with the specified name.

    • C#
    • VB.NET
    public bool TryGet(string name, out VbaModule vbaModule)
    Public Function TryGet(name As String, ByRef vbaModule As VbaModule) As Boolean
    Parameters
    name
    System.String

    Name of the VbaModule contained in the collection.

    vbaModule
    VbaModule

    The found VbaModule with the given name.

    Returns
    System.Boolean

    true if the collection contains an item with the name; otherwise, false.

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.