Select Case YourVar<BR> Case "1"<BR> ' YourVar = "1"<BR> Case "2"<BR> ' YourVar = "2"<BR> ...<BR> Case Else<BR> ' None of the above<BR>End Select<BR><BR>Look up the VBScript reference on http://msdn.microsoft.com/scripting - this is all in there...<BR><BR>Craig.
ok, here is an example<BR><BR>Sub Diesel (menu)<BR>Select Case (menu)<BR> Case 1<BR>if session ("test") <BR>response.write diesel power<BR>end if<BR> Case 2<BR>if session ("miles")<BR>response.write trippin<BR>end if<BR><BR>What I wish to do if possible is to run through each of the case statements first and based on the session select the appropriate case and then write the output.<BR><BR>Hope I was much clearer here<BR><BR>trippy
what you've written will work but it display "diesel power" if menu = 1, and display "trippin" if menu = 2<BR><BR>to do what you need remove the case statment and then it'll just run the if statments..
but they are several sessions not just 2 or else it would be easy. They are about 4-5. Hence I am thinking it run through the cases, check each session and the session which is releveant, it would then write the appropriate sentence.<BR><BR>hope I have not been too ambiguous.<BR><BR>trippy