我在用户窗体中有一个 ComboBox,我正在寻找一种方法来查找选择的内容,以便我可以将其用作字符串并将其传递给工作表上的单元格。例如:
Private Sub Filter_Click()
'The Userform is called Summary, and the ComboBox in question is named Month_Filter
If Summary.Month_Filter = "January" Then .......
Call UpdatedTotals
End Sub
Sub UpdatedTotals()
Dim ChosenDate as String
If Summary.Month_Filter <> "" Then ChosenDate = Summary.Month_Filter.Value
Range("A1").FormulaR1C1 = ChosenDate
End Sub