Private Sub Label1_Click()
Select Case ComboBox1.Value
case "A"
UserForm1.Hide
UserForm2.Show
case "B"
UserForm1.Hide
UserForm3.Show
case "C"
UserForm1.Hide
UserForm4.Show
Private Sub Label2_Click()
Select Case ComboBox2.Value
case "A"
UserForm1.Hide
UserForm2.Show
case "B"
UserForm1.Hide
UserForm3.Show
case "C"
UserForm1.Hide
UserForm4.Show
由於Label1的case "XXX"和Label2的case "XXX"
且case "X"非常的多~我另外開了一個Module1內容如下
Sub Search()
case "A"
UserForm1.Hide
UserForm2.Show
case "B"
UserForm1.Hide
UserForm3.Show
case "C"
UserForm1.Hide
UserForm4.Show
然後改寫Label1和Label2的內容~如下
Private Sub Label1_Click()
Select Case ComboBox1.Value
Call Search
Private Sub Label2_Click()
Select Case ComboBox2.Value
Call Search
但是卻出現編譯錯誤:"在Select Case 與第一個Case陳述式間,有不正確的陳述式或標籤作者: chin15 時間: 2012-9-10 20:13