VoiceGuide IVR Software Main Page
Jump to content

Global Vb Functions

Recommended Posts

is there any way of making vbscript functions global to all vb modules throughout the script ?

 

they only seem to work within the given module

Share this post


Link to post

You can use the Execute/ExecuteGlobal VBScript statements to access the external

scripts. For example:

 

 

Function Include(sScriptPathspec)

On Error Resume Next

ExecuteGlobal CreateObject("Scripting.FileSystemObject")_

.OpenTextFile(sScriptPathspec).ReadAll

Include = (Err = 0)

End Function

 

Place the call to the Include function before the first use of the

function(s)/sub(s) included in the named script file (which can have an

arbitrary extension). The function returns True if the load was

successful, otherwise False.

 

Google VBScript and ExecuteGlobal for more information.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×