Hello,
I am quite new to vbs and just trying to learn more about loops. I have been playing around with some simple code that is a reminder. I need some help with adding to this code as I want to ask the user if they want to enter another reminder once they cancel the first one. I have played around with it but cannot get it to do what I want. Here is the code I am working with....
I want the user to have the option to continue if the user presses cancel.
Like:
This is what I have tried but I get errors trying to place in another Do-Loop. Any help is greatly appreciated.
Thanks!
I am quite new to vbs and just trying to learn more about loops. I have been playing around with some simple code that is a reminder. I need some help with adding to this code as I want to ask the user if they want to enter another reminder once they cancel the first one. I have played around with it but cannot get it to do what I want. Here is the code I am working with....
Code:
reminder = InputBox(vbNewLine & strComputerName & ", Enter a reminder message for today!" & vbNewLine & vbNewLine & WeekDayName(WeekDay(Now())) & " - " & Date,"Daily Reminder")
frequency = InputBox(vbNewLine & "How often in 'MINUTES' would you like to be reminded?")
do
WScript.Sleep 60000 * frequency
answer=MsgBox(reminder & " " & vbNewLine & vbNewLine & "Press Cancel to Stop Reminder " ,65,"Time: " & Time)
loop
if answer = 2 then WScript.Quit
I want the user to have the option to continue if the user presses cancel.
Like:
Code:
if answer = 2 then
reply = msgbox"Would you like to create another reminder?", vbYesNo
This is what I have tried but I get errors trying to place in another Do-Loop. Any help is greatly appreciated.
Thanks!