I don\'t know why this code doesn\'t work:
Dim a
a = InputBox(\"What time do you want?\")
If InStr(a, \"pm\") Then
(Replace(a, \"pm\", \"\"))
a = a + 12
When you try to run that code you should get the following error
Microsoft VBScript compilation error: Expected statement
Line 4
which will lead you to the culprit which is
(Replace(a, "pm",""))
which isn't a valid statement in VBScript hence the error.
Based on what you are trying to do the script needs to return the result of the Replace()
function call, something like this
a = Replace(a, "pm","")