Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmTerminal Object / RemoveVBAReference Method
The fully qualified file name of the session document file to remove.
Example
In This Topic
    RemoveVBAReference Method (IbmTerminal)
    In This Topic

    Removes a reference to a session document file from the VBA References settings. After you remove this file name, the macros in that file are no longer available in the current session. To make this change permanent, you'll need to save your session document file.

    Syntax
    expression.RemoveVBAReference( _
       ByVal sessionPath As String _
    ) 
    where expression is a variable that represents a IbmTerminal Object

    Parameters

    sessionPath
    The fully qualified file name of the session document file to remove.
    Example
    This sample adds a reference to a session document file that contains macros and prints a list of all the referenced session documents. Then it removes the reference to the file and prints the list again.
    Sub AddAndRemoveVBAReference()
        
        Dim listOfSessionFiles() As String
        
        ThisIbmTerminal.AddVBAReference ("\\myServer\shared\sharedDemo.rd3x")
         
        listOfSessionFiles = ThisIbmTerminal.GetVBAReferences()
        Debug.Print "After adding to list"
        For Each Item In listOfSessionFiles
            Debug.Print Item
        Next
        
        ThisIbmTerminal.RemoveVBAReference ("\\myServer\shared\sharedDemo.rd3x")
        
        listOfSessionFiles = ThisIbmTerminal.GetVBAReferences()
        Debug.Print "After removing from list"
        For Each Item In listOfSessionFiles
            Debug.Print Item
        Next
        
    End Sub
    See Also