Quantcast
Channel: How can I create an If statement with multiple conditions (not: multiple statements nested) in VBS? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by user2140173 for How can I create an If statement with multiple...

The shortest way I know is (boolean type)UBound(Filter(Array("docx", "xlsx", "txt"), "pdf")) > -1 returns FalseandUBound(Filter(Array("docx", "xlsx", "txt"), "txt")) > -1 returns Trueas you can...

View Article



Answer by Alex K. for How can I create an If statement with multiple...

How about select case:extension = lcase(objFso.GetExtensionName(objFile.Path))select case extension case "docx", "xlsx", "txt"' is one of the above' do something case "zzz"' its a .zzz case else' its...

View Article

How can I create an If statement with multiple conditions (not: multiple...

In PHP, if I can compare a value against a list of other values on the fly:$extension = "pdf";if (!in_array($extension, array("docx", "xlsx", "txt")) { // do stuff to the pdf}How could I port this to...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images