我是 vba excel 的新手,我已经成功放置了一个依赖于下拉列表选择的条件组合框,我面临的问题是每当我点击组合框中的任何项目时,它都不会出现在框中点击。
谁能帮我解决这个问题。
谢谢你
我使用的代码是:
Private Sub ComboBox1_DropButtonClick()
ComboBox1.Clear
If Worksheets("Sheet1").Cells(2, 1).Value = "PHE" Then
With ComboBox1
For row = 1 To 1300
.AddItem Sheets("Sheet2").Cells(row, 6)
Next row
End With
End If
If Worksheets("Sheet1").Cells(2, 1).Value = "HSS" Then
With ComboBox1
For row = 2 To 56
.AddItem Sheets("Sheet2").Cells(row, 8)
Next row
End With
End If
If Worksheets("Sheet1").Cells(2, 1).Value = "Decanter" Then
With ComboBox1
For row = 3 To 249
.AddItem Sheets("Sheet2").Cells(row, 9)
Next row
End With
End If
End Sub