• 締切済み

うまくできない??NO2

Private Sub P1_Click(Index As Integer) If Index = 1 Or 2 Or 3 Or 4 Or 5 Then If P1(1).BackColor = vbRed Then P1(1).BackColor = vbBlue Else P1(1).BackColor = vbRed End If If P1(2).BackColor = vbRed Then P1(2).BackColor = vbBlue Else P1(2).BackColor = vbRed End If If P1(3).BackColor = vbRed Then P1(3).BackColor = vbBlue Else P1(3).BackColor = vbRed End If If P1(4).BackColor = vbRed Then P1(4).BackColor = vbBlue Else P1(4).BackColor = vbRed End If If P1(5).BackColor = vbRed Then P1(5).BackColor = vbBlue Else P1(5).BackColor = vbRed End If '------------------------------------------------------------------- ElseIf Index = 6 Or 7 Or 8 Or 9 Or 10 Then ~~~~~ 省略 ElseIf Index = 21 Or 22 Or 23 Or 24 Or 25 Then If P1(21).BackColor = vbRed Then P1(21).BackColor = vbBlue Else P1(21).BackColor = vbRed End If If P1(22).BackColor = vbRed Then P1(22).BackColor = vbBlue Else P1(22).BackColor = vbRed End If If P1(23).BackColor = vbRed Then P1(23).BackColor = vbBlue Else P1(23).BackColor = vbRed End If If P1(24).BackColor = vbRed Then P1(24).BackColor = vbBlue Else P1(24).BackColor = vbRed End If If P1(25).BackColor = vbRed Then P1(25).BackColor = vbBlue Else P1(25).BackColor = vbRed End If End If '------------------------------------------------------------------ 続く・・・ 関連URL:http://oshiete1.goo.ne.jp/kotaeru.php3?qid=418248

みんなの回答

回答No.1

管理者より: 続きの質問があるのでそちらをご参照下さい

参考URL:
http://www.okweb.ne.jp/kotaeru.php3?q=418251

関連するQ&A