Multi purpose script: (run Sub based on syntax call)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 'This is to have a script perform different functions based on parameters being fed. 'Was given by Neila (Jan 27,2000) 'The following Script is called from Syntax using: . 'Script "D:\\Test\\ScrPar.sbs" ("0"). 'Script "D:\\Test\\ScrPar.sbs" ("1"). 'SCRIPT FILE SCRPAR.SBS Public Sub Main () Dim strParam As String strParam = objSpssApp.ScriptParameter(0) Select Case strParam Case "0" Call Sub0 Case "1" Call Sub1 '...... End Select End Sub Private Sub Sub0() MsgBox "Running Sub 0" End Sub Private Sub Sub1() MsgBox "Running Sub 1" End Sub |
Related pages
...