Clever-Excel-Forum

Normale Version: Verbesserunsvorschläge
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2
Mal nur die Übergabe:

Private Sub cmdEingabe_Click()
'fügt angaben ins tabellenblatt ein 
Dim intErsteLeereZeile As Long
   With Tabelle1
      intErsteLeereZeile = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
      With .Rows(intErsteLeereZeile)
         .Cells(1) = txtDatum
         .Cells(2) = txtbenzin + 0
         .Cells(3) = txtPreis + 0
         .Cells(4) = txtKilometer + 0
         .Cells(5) = .Cells(2) / .Cells(4) * 100
         .Cells(6) = .Cells(3) / .Cells(4)
         .Cells(7) = .Cells(3) / .Cells(2)
         .Cells(8) = .Cells(5) / 100
      End With
   End With
End Sub

Gruß Ralf
Code:
Private Sub cmdEingabe_Click()
  sp=array(txtdatum,--txtbenzin,--txtPreis,-- txtKilometer)

  Tabelle1.Cells(.Rows.Count,1).End(xlUp).Offset(1).resize(,8)=array(sp(0),sp(1),sp(2),sp(3),sp(1)/sp(3)*100,sp(2)/sp3),sp(2)/sp(1),sp(4)/100)
End Sub
Seiten: 1 2