如何获取连续(A1,B1,C1等)中的所有单元格值(例如日期)并将其放在组合框中?
我试过这个但没有运气:
Private Sub ComboBox1_DropButtonClick()
With Worksheets("Sheet1")
ComboBox1.List = .Range("A1:Z" & .Range("A" & .Columns.Count).End(xlRight).Column).Value
End With
End Sub
答案 0 :(得分:0)
像这样的东西
虽然您可能希望进一步使用该范围来删除空白,欺骗等
Private Sub ComboBox1_DropButtonClick()
Dim rng1 As Range
With Sheets(1)
Set rng1 = .Range([a1], Cells(1, Columns.Count).End(xlToLeft))
ComboBox1.List = Application.Transpose(rng1.Value)
End With
End Sub