Private Sub Workbook_Open() Dim S(2) As String S(0) = "バラ" S(1) = "サクラ" S(2) = "キク" Sheet1.CommandButton1.Caption = "実行" Sheet1.Label1.Caption = "花の名前を選択してください" Sheet1.ComboBox1.List = S Sheet1.ComboBox1.Font.Size = 12 Sheet1.ComboBox1.Style = fmStyleDropDownList Sheet1.ComboBox1.ListIndex = -1 End Sub
Sub Macro1() res = Sheet1.ComboBox1.ListIndex dp = 1 End Sub