#1
|
|||
|
|||
Calling function within functions and/or loop conditions.
Hi There,
Can we call other loop condition with in first loop condition and/or if condition Example, If InStr(nProcesses,"CXL") <> 0 Then ObjStream.WriteLine " Cancel Reservations: " & nProcesses ObjStream.WriteLine " " CreateObject("WScript.Shell").Popup nProcesses, 1, nProcesses **call xyz crt.Screen.Send chr(27) & "D" Else if InStr(nProcesses,"C/O") <> 0 then ObjStream.WriteLine " Check Out Reservations: " & nProcesses ObjStream.WriteLine " " CreateObject("WScript.Shell").Popup nProcesses, 1, nProcesses crt.Screen.Send chr(27) & "D" Else ObjStream.WriteLine " Reservations: " & nProcesses ObjStream.WriteLine " " CreateObject("WScript.Shell").Popup nProcesses, 1, nProcesses crt.Screen.Send chr(27) & "D" End If End If Function xyz*** Statement line1 Statement line2 Statement linen End sub Can I call function xyz in any of the if condition ? if yes how to call that? does code require any exceptions need to provide. |
#2
|
|||
|
|||
Hi vensas3181,
I've included an example of calling a function. Code:
# $language = "VBScript" # $interface = "1.0" Dim strInput Sub Main() strInput = crt.Dialog.Prompt("Enter Value", "Value", "") xyz End Sub Function xyz() crt.Dialog.MessageBox("This is inside the function." & vbcrlf & vbcrlf & strInput ) End Function Does this help?
__________________
Thanks, --Eric VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|