kbamonte Report post Posted 02/28/2007 01:13 PM 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
SupportTeam Report post Posted 02/28/2007 08:06 PM 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