'Declaration
Sub AddVBAReference( _ ByVal sessionPath As String _ )
void AddVBAReference( string sessionPath )
Parameters
- sessionPath
- The fully qualified file name of the session document file that contains the macros you want to share.
'Declaration
Sub AddVBAReference( _ ByVal sessionPath As String _ )
void AddVBAReference( string sessionPath )
Exception | Description |
---|---|
Attachmate.Reflection.Framework.VBAReferenceNotInTrustedLocationException | This exception is thrown when you add a reference to a session file that is not in a trusted location. |
Attachmate.Reflection.Framework.VBAReferenceIncorrectSessionTypeException | This exception is thrown when you add a reference to a session file that is not the same session type as the current session. |
Attachmate.Reflection.Framework.VBAReferenceException | This exception is thrown if a sesson file does not exist, is not a valid file, or has an invalid file name. It is also thrown if a sesson file contains VBA projects that conflict with existing VBA projects or if security settings prevent adding VBA references. |
Before you add a reference to a session document file, make sure that the file is in a trusted location. Session files cannot be accessed unless they are in trusted locations.
Make sure the projects in the files you reference have unique project names. Each project name in the VBA editor must be unique to avoid errors caused by naming conflicts.