I am using VBscript in VB6, and what I want to do is actually call a GLOBAL function/sub without having to define the form so I can throw it in a global module. For example, I use VB6 to call a VBscript, in the VBScript called MyScript.vbs I have:
test2 being in a module in my global script. I currently know you can do something like:
To actually call something INSIDE a form, if 'whatform' has the function/sub.
Basicly what I am trying to do is have it so it's a global command, so my 'scripters' don't have to do anything additional, so they can call a function on VB6 side that are public. Get me? Including the example I'm using, it's modified a bit to run with my server so just remove anything additional if you want it. Currently frmServer is the frm it is called in, which is not public functions.
Public Sub Test(ByVal Index As Integer, ComArray() As String, Comi As Long)
ScriptFileName = "MyScript.vbs"
Dim StrScript As String
Open App.Path & "\" & ScriptFileName For Binary Access Read As #1
StrScript = String(LOF(1), 0)
Get #1, , StrScript
On Error Resume Next
frmServer.SCShards.AllowUI = True
frmServer.SCShards.UseSafeSubset = True
Dim shardtest As String
If frmServer.SCShards.Procedures.Count > 0 Then
shardtest = frmServer.SCShards.Run("Test", frmServer, userchp(Index))
If Err.Number <> 0 Then MsgBox "Error: " & Err.Number & " (&H" & Hex(Err.Number) & ")" & vbNewLine & vbNewLine & Err.Description, vbExclamation
Public Sub test2()