鼠标选中文本框背景颜色改变的问题
我想实现这个功能。我鼠标点击上图任何一个文本框,这一行所有的文本框背景色
都变成绿色。如何实现,谢谢!
[此贴子已经被作者于2019-1-17 18:52编辑过]
Dim xx1 As Integer Private Sub Form_Load() For i = 0 To 6 Text1(i).Text = "2017-01-17" Text2(i).Text = "拉伸12" Text3(i).Text = "圆材(mm)" Text4(i).Text = "18" Text5(i).Text = "50" Next i End Sub Private Sub Text1_Click(Index As Integer) xx1 = Index Call GY End Sub Private Sub Text2_Click(Index As Integer) xx1 = Index Call GY End Sub Private Sub Text3_Click(Index As Integer) xx1 = Index Call GY End Sub Private Sub Text4_Click(Index As Integer) xx1 = Index Call GY End Sub Private Sub Text5_Click(Index As Integer) xx1 = Index Call GY End Sub Private Sub GY() For i = 0 To 6 Text1(i).BackColor = &HFFFFFF Text2(i).BackColor = &HFFFFFF Text3(i).BackColor = &HFFFFFF Text4(i).BackColor = &HFFFFFF Text5(i).BackColor = &HFFFFFF Next i Text1(xx1).BackColor = &H109901 Text2(xx1).BackColor = &H109901 Text3(xx1).BackColor = &H109901 Text4(xx1).BackColor = &H109901 Text5(xx1).BackColor = &H109901 End Sub