標題: [發問] Select Case ComboBox1~5 內容相同,該如何讓他參照? [打印本頁] 作者: av8d 時間: 2012-10-4 14:19 標題: Select Case ComboBox1~5 內容相同,該如何讓他參照?
Select Case ComboBox1.Value
Case ""
MsgBox ("請輸入關鍵字")
Case "春子飲食店"
UserForm1.Hide
UserForm2.Show
Case "巧米 雞|腿|大|王"
UserForm1.Hide
UserForm3.Show
Case "大快活快餐廳"
UserForm1.Hide
UserForm4.Show
Case "來來麵食館"
UserForm1.Hide
UserForm5.Show
Case "山海珍平價熱炒"
UserForm1.Hide
UserForm6.Show
Case "紅喬自助餐"
UserForm1.Hide
UserForm7.Show
Case "牛家莊"
UserForm1.Hide
UserForm8.Show
Case "翔美快餐店"
UserForm1.Hide
UserForm9.Show
Case "香港洪記燒臘"
UserForm1.Hide
UserForm10.Show
Case "鴨肉榮"
UserForm1.Hide
UserForm11.Show
Case "江下麵食"
UserForm1.Hide
UserForm12.Show
Case "悟饕池上飯包"
UserForm1.Hide
UserForm13.Show
Case "小廚師麵館"
UserForm1.Hide
UserForm14.Show
Case "檸檬泰式快餐"
UserForm1.Hide
UserForm15.Show
Case "猋師傅"
UserForm1.Hide
UserForm16.Show
Case "食全食美自助餐"
UserForm1.Hide
UserForm17.Show
Case "牛丼"
UserForm1.Hide
UserForm18.Show
Case "漁都日本料理"
UserForm1.Hide
UserForm68.Show
Case "黑丸嫩仙草"
UserForm1.Hide
UserForm167.Show
End Select
複製代碼
一共有五個內容都相同的Select Case ComboBox
Select Case ComboBox1.Value
End Select
Select Case ComboBox2.Value
End Select
Select Case ComboBox3.Value
End Select
Select Case ComboBox4.Value
End Select
Select Case ComboBox5.Value
End Select
內容如最上方~但是會隨時變更~
每次變更都要複製到以上ComboBox5內~
是否有變通的方法?作者: stillfish00 時間: 2012-10-4 15:41