Eine Familie von Microsoft-Tabellenkalkulationsprogrammen mit Tools zum Analysieren, Darstellen und Vermitteln von Daten.
hallo claus,
ich hoffe ich vergesse nun keine antwort auf deine fragen.
leeren:
Private Sub Leeren()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox18.Text = ""
TextBox19.Text = ""
TextBox20.Text = ""
TextBox21.Text = ""
TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
TextBox25.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
UserForm_initialize
End Sub
füllen:
Private Sub Füllen()
Dim lngSuch
Dim i As Integer
Dim LRow As Long
Dim rngC As Range
LRow = Cells(Rows.Count, 1).End(xlUp).Row
lngSuch = Me.TextBox4.Value
Set rngC = Range("A2:A" & LRow).Find(lngSuch, Range("A" & LRow), xlValues)
With UserForm1
If Not rngC Is Nothing Then
.TextBox1 = Cells(rngC.Row, 2)
.TextBox2 = Cells(rngC.Row, 4)
.TextBox3 = Cells(rngC.Row, 3)
'.TextBox4 = Cells(rngC.Row, 4)
.TextBox5 = Cells(rngC.Row, 5)
.TextBox6 = Cells(rngC.Row, 6)
.TextBox7 = Cells(rngC.Row, 7)
.TextBox8 = Cells(rngC.Row, 8)
.TextBox9 = Cells(rngC.Row, 9)
.TextBox10 = Cells(rngC.Row, 10)
.TextBox11 = Cells(rngC.Row, 11)
.TextBox12 = Cells(rngC.Row, 12)
.TextBox13 = Cells(rngC.Row, 13)
.TextBox14 = Cells(rngC.Row, 14)
.TextBox15 = Cells(rngC.Row, 15)
.TextBox16 = Cells(rngC.Row, 16)
.TextBox17 = Cells(rngC.Row, 17)
.TextBox18 = Cells(rngC.Row, 18)
.TextBox19 = Cells(rngC.Row, 19)
.TextBox20 = Cells(rngC.Row, 20)
.TextBox21 = Cells(rngC.Row, 21)
.TextBox22 = Cells(rngC.Row, 22)
.TextBox23 = Cells(rngC.Row, 23)
.TextBox24 = Cells(rngC.Row, 24)
.TextBox25 = Cells(rngC.Row, 25)
.TextBox26 = Cells(rngC.Row, 26)
.TextBox27 = Cells(rngC.Row, 27)
Else
Meldung ' nummer ist noch nicht vorhanden. anlegen? ja oder nein.
End If
End With
End Sub
dieses wird alles in einer mappe / tabellenblatt ausgeführt. also eigentlich nur eine art eingabehilfe um nicht immer von zelle zu zelle springen zu müssen, sondern die eingaben per userform in die tabelle schreiben zu lassen bzw. auszulesen. die textbox4 dient dazu die richtige zeile anzuspringen, in der sich die benötigten daten befinden.
es ist ein wenig kompliziert und sicher auch nicht sauber gelöst von mir. aber es funktioniert. wenigstens der grösste teil davon.
gruss.
berthold