VBA – Programmierung mit Excel Grundlagen
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
UserForm 3<br />
ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Select<br />
If ActiveCell.Row = 1 Then<br />
txtNr.Text = "0001"<br />
Else<br />
txtNr.Text = Cells(ActiveCell.Row, 1).Value + 1<br />
End If<br />
Cells(ActiveCell.Row + 1, 1).Activate<br />
cmbZiel.Text = ""<br />
cmbPreis.Text = ""<br />
cmbPers.Text = ""<br />
chkBuch.Value = False<br />
txtPreis.Text = ""<br />
cmdBuch.Visible = False<br />
cmdLösch.Visible = False<br />
End Sub<br />
• AUFRUF FORM GESAMTSUMME<br />
• BEENDEN<br />
Private Sub cmdGesamt_Click()<br />
Dim Pwd As String<br />
frmGesamt.Show<br />
End Sub<br />
Private Sub cmdEnde_Click()<br />
Range("A1").Activate<br />
End<br />
End Sub<br />
• PASSWORDPRÜFUNG UND SUMMENAUSGABE<br />
Private Sub cmdPwd_Click()<br />
If txtPwd.Text = "Gogolok" Then<br />
ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Select<br />
txtSumme.Value = _<br />
WorksheetFunction.Sum(Range(ActiveCell, Cells(2,<br />
ActiveCell.Column)))<br />
Else<br />
MsgBox "Falsche Angabe, bitte wiederholen !", 16, "Fehler"<br />
txtPwd.Text = ""<br />
txtPwd.SetFocus<br />
End If<br />
End Sub<br />
• BEENDEN DER SUMMENAUSGABE<br />
Private Sub cmdBack_Click()<br />
Hide<br />
End Sub<br />
Seite 121