.Cells(8, 4) - Du mußt die 8 anpassen !
01.10.2011 07:45:15
Matthias
Hallo
Du mußt Excel aber auch mitteilen in welcher Zeile der entsprechende Spieler steht!
Private Sub UserForm_Activate()
Dim MyRow& ' & = as Long
MyRow = ActiveCell.Row
'Diese Zeile kannst Du ja wieder löschen!
MsgBox "wir sind in Zeile: " & MyRow, vbInformation, "Info für " & Application.UserName & " ;o)" _
UserForm2.Caption = "Tippliste " & ActiveCell.Value
With ActiveSheet
Label1 = .Cells(2, 71) 'Team 1
TextBox1 = .Cells(2, 72)
TextBox2 = .Cells(3, 72)
ComboBox1 = .Cells(MyRow, 3)
ComboBox2 = .Cells(MyRow, 4)
Label2 = .Cells(4, 71) 'Team 2
TextBox3 = .Cells(4, 72)
TextBox4 = .Cells(5, 72)
ComboBox3 = .Cells(MyRow, 5)
ComboBox4 = .Cells(MyRow, 6)
Label3 = .Cells(6, 71) 'Team 3
TextBox5 = .Cells(6, 72)
TextBox6 = .Cells(7, 72)
ComboBox5 = .Cells(MyRow, 7)
ComboBox6 = .Cells(MyRow, 8)
Label4 = .Cells(MyRow, 71) 'Team 4
TextBox7 = .Cells(MyRow, 72)
TextBox8 = .Cells(9, 72)
ComboBox7 = .Cells(MyRow, 9)
ComboBox8 = .Cells(MyRow, 10)
Label5 = .Cells(10, 71) 'Team 5
TextBox9 = .Cells(10, 72)
TextBox10 = .Cells(11, 72)
ComboBox9 = .Cells(MyRow, 11)
ComboBox10 = .Cells(MyRow, 12)
Label6 = .Cells(12, 71) 'Team 6
TextBox11 = .Cells(12, 72)
TextBox12 = .Cells(13, 72)
ComboBox11 = .Cells(MyRow, 13)
ComboBox12 = .Cells(MyRow, 14)
Label7 = .Cells(14, 71) 'Team 7
TextBox13 = .Cells(14, 72)
TextBox14 = .Cells(15, 72)
ComboBox13 = .Cells(MyRow, 15)
ComboBox14 = .Cells(MyRow, 16)
Label8 = .Cells(16, 71) 'Team 8
TextBox15 = .Cells(16, 72)
TextBox16 = .Cells(17, 72)
ComboBox15 = .Cells(MyRow, 17)
ComboBox16 = .Cells(MyRow, 18)
Label9 = .Cells(18, 71) 'Team 9
TextBox17 = .Cells(18, 72)
TextBox18 = .Cells(19, 72)
ComboBox7 = .Cells(MyRow, 19)
ComboBox18 = .Cells(MyRow, 20)
Label10 = .Cells(20, 71) 'Team 10
TextBox19 = .Cells(20, 72)
TextBox20 = .Cells(21, 72)
ComboBox19 = .Cells(MyRow, 21)
ComboBox20 = .Cells(MyRow, 22)
Label11 = .Cells(22, 71) 'Team 11
TextBox21 = .Cells(22, 72)
TextBox22 = .Cells(23, 72)
ComboBox21 = .Cells(MyRow, 23)
ComboBox22 = .Cells(MyRow, 24)
Label12 = .Cells(24, 71) 'Team 12
TextBox23 = .Cells(24, 72)
TextBox24 = .Cells(25, 72)
ComboBox23 = .Cells(MyRow, 25)
ComboBox24 = .Cells(MyRow, 26)
End With
End Sub
Gruß Matthias