yasha Posted November 13, 2018 Share Posted November 13, 2018 is there an easier or shorter program to run if for multiple numbers If $selectedflag[$charcnt] = 11 or If $selectedflag[$charcnt] = 12 or If $selectedflag[$charcnt] = 15 or If $selectedflag[$charcnt] = 17 or If $selectedflag[$charcnt] = 19 or If $selectedflag[$charcnt] = 20 or If $selectedflag[$charcnt] = 21 or If $selectedflag[$charcnt] = 24 Then Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted November 13, 2018 Share Posted November 13, 2018 @yasha Look at Switch statement in the Help file Switch $selectedflag[$charcnt] Case 11, 12, 15, 17, 19, 21, 21, 24 ; Do something Case Else ; ... EndSwitch yasha 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Marc Posted November 13, 2018 Share Posted November 13, 2018 Switch $selectedflag[$charcnt] case 11, 12, 15, 17, 19, 20, 21, 24 MsgBox (0,"ok", "hit") EndSwitch yasha 1 Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
Aether Posted November 13, 2018 Share Posted November 13, 2018 @op, don't put if after or/and ! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now