Private Sub Option1_Click(Index As Integer)""字型、字色、背景都用控制元件陣列Text1.FontName = Option1(Index).Caption "字型End SubPrivate Sub Option2_Click(Index As Integer)If Option2(Index).Caption = "紅色" Then "背景色Text1.BackColor = vbRedElseIf Option2(Index).Caption = "綠色" ThenText1.BackColor = vbGreen "色值,VB裡有定義的ElseText1.BackColor = &HFF0000 "藍色16進位制值。這樣寫也行End IfEnd SubPrivate Sub Option3_Click(Index As Integer)If Option3(Index).Caption = "紅色" Then "字色Text1.ForeColor = vbRedElseIf Option3(Index).Caption = "綠色" ThenText1.ForeColor = vbGreen "色值,VB裡有定義的ElseText1.ForeColor = &HFF0000 "這是藍色值。這樣寫也行End IfEnd Sub
Private Sub Option1_Click(Index As Integer)""字型、字色、背景都用控制元件陣列Text1.FontName = Option1(Index).Caption "字型End SubPrivate Sub Option2_Click(Index As Integer)If Option2(Index).Caption = "紅色" Then "背景色Text1.BackColor = vbRedElseIf Option2(Index).Caption = "綠色" ThenText1.BackColor = vbGreen "色值,VB裡有定義的ElseText1.BackColor = &HFF0000 "藍色16進位制值。這樣寫也行End IfEnd SubPrivate Sub Option3_Click(Index As Integer)If Option3(Index).Caption = "紅色" Then "字色Text1.ForeColor = vbRedElseIf Option3(Index).Caption = "綠色" ThenText1.ForeColor = vbGreen "色值,VB裡有定義的ElseText1.ForeColor = &HFF0000 "這是藍色值。這樣寫也行End IfEnd Sub