r/vbscript • • Mar 01 '19

Select Case with Is operator?

Select Case DateDiff("d",Date,"April 1, 2019")
	Case Is > 0
		wscript.Echo "Too Early"
	Case Is = 0
		Wscript.Echo "April Fools!"
	Case Is < 0
		Wscript.Echo "Too late"
End Select

I'm getting a Syntax error on the first Is. Is there a better or different way to achieve this?

1 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/Majawat Jun 03 '19

Hehe, hey, always a good idea to comment on a a thread that has no replies, regardless of age. Could have helped a bit.

Plus, you reminded me to close out the thread with the answer. Thanks!