suite to multiconditional code


Posted by amroo on April 27, 2001 12:35 AM

Bonjour, I have a combobox filled by values (numbers as ID), when I click I want a specific spreadsheets
appears .
expl: for ID= 12, 30, 23, 38 Sheets: A
ID= 4, 8, 34, 67, 11 Sheets: B
etc.....
What is the best way to code this?
2001 Thanks
amroo



Posted by Malc on April 27, 2001 12:58 AM

Sub Choice()
Select Case Id
Case 12, 30, 23, 38
Workbooks("A").activate ' or sheets("A").select
Case 4, 8, 34, 67, 11
Workbooks("B").activate ' or sheets("B").select
case else
'Pick another number
End Select
End Sub