Hello,
Voila, this morning I was amused to program a little script, especially for fun and learning, but I have a worry. Here is my script:
msg = InputBox (msg, "What is your name?")
Time = "It is" & Hour (Now) & "h" & Minute (Now) & "min" & Second (Now) & "sec."
if Hour (Now) <= 18 then
Message = "Hello"
else
Message = "Hello"
end if
if Hour (Now) <= 18 then
Message2 = "Have a nice day!"
else
Message2 = "Have a good evening!"
end if
if msg <> "" then
MsgBox Message & "" & msg & "!" & VbNewLine & vbNewLine & Time & Message2, vbInformation + vbOKOnly vbApplicationModal + + 0, ""
end if
if msg = "" then
MsgBox "Please enter your first name.", VbCritical + vbOKOnly + vbApplicationModal + 0 ""
end if
As you can see, if in my inputbox, there is nothing marked the script announces a mistake, either, but I'd like to add a command to return to the top of my script, because then, after the errors in my script closes.
I hope I was clear on my statement,
Best regards.



Reply With Quote
Copyright Techfuels
Bookmarks