OfficeAnimal
Technical User
I am trying to establish whether or not a call to a function is replaced by the value it generates. I have this code
Function readInput(CellIndex)
' debug
WScript.Echo "In readInput"
readInput = InputBox("Enter Coefficient " & CellIndex, vbOKOnly+vbQuestion, "Coefficient Entry")
' debug
WScript.Echo "Entered datum was " & readInput
End Function ' readInput
' ----------------------------------------------------------------------------
Sub validateTheDatum(DataArray, RunTheProgram, CellIndex, ValidSignal)
' Selection Sub to ensure only numeric data is returned
' debug
WScript.Echo "In validateTheDatum"
Dim val
val = readInput CellIndex ' <----------------------------- Debug expects end of statement here
wscript.Echo val
' <-------------------------------------------- When debugged, real code goes here
' debug
ValidSignal = False
WScript.Echo "validateTheDatum just changed ValidSignal to" & ValidSignal
End Sub ' validateTheDatum
What have I goofed up?
Thanks
"Truth will sooner come out from error than from confusion."
Francis Bacon (1561-1626)
Function readInput(CellIndex)
' debug
WScript.Echo "In readInput"
readInput = InputBox("Enter Coefficient " & CellIndex, vbOKOnly+vbQuestion, "Coefficient Entry")
' debug
WScript.Echo "Entered datum was " & readInput
End Function ' readInput
' ----------------------------------------------------------------------------
Sub validateTheDatum(DataArray, RunTheProgram, CellIndex, ValidSignal)
' Selection Sub to ensure only numeric data is returned
' debug
WScript.Echo "In validateTheDatum"
Dim val
val = readInput CellIndex ' <----------------------------- Debug expects end of statement here
wscript.Echo val
' <-------------------------------------------- When debugged, real code goes here
' debug
ValidSignal = False
WScript.Echo "validateTheDatum just changed ValidSignal to" & ValidSignal
End Sub ' validateTheDatum
What have I goofed up?
Thanks
"Truth will sooner come out from error than from confusion."
Francis Bacon (1561-1626)