Jump to content

Recommended Posts

Posted

Greetings.  I am trying to have the script below run where for the 2019 calendar year,  if the current month is greater than or equal to January and less than the month of July send one message box and if  if the current month is greater than or equal to July and and less than or equal to the month of December send a different message box.  Somewhere I am off, but I can't figure out where.  Thanks for any assistance in advance!

If @Year = 2019 Then
    If @MON >= "1" or @MON < "7" Then MsgBox(262144,"","Date range is between January and June.")
    If @MON >= "7" and @MON <= "12" Then MsgBox(262144,"","Date range is between July and December.")
EndIf

 

Posted (edited)

Doh't1  I forgot to change that back after I was adding some additional date parameters when testing. 

Anyway, even when I change it from "and" to "or", I still get both message box prompts. 

So I guess that's  happening because the and < 12, but not sure how to address that where it will only acknowledge the month range between July and December like it does for January through the end of June.

Edited by TheCrimsonCrusader

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...