VERSION 5.00 Begin VB.Form Form1 Caption = "Schaltjahr" ClientHeight = 3705 ClientLeft = 60 ClientTop = 345 ClientWidth = 6855 LinkTopic = "Form1" ScaleHeight = 3705 ScaleWidth = 6855 StartUpPosition = 3 'Windows Default Begin VB.TextBox tfSchaltjahr Height = 375 Left = 960 TabIndex = 2 Top = 2520 Width = 4575 End Begin VB.TextBox tfJahr Height = 375 Left = 960 TabIndex = 0 Top = 960 Width = 1695 End Begin VB.CommandButton bsBerechnen Caption = "Berechnen" Height = 375 Left = 960 TabIndex = 3 Top = 1680 Width = 1695 End Begin VB.Label Label2 Caption = "Schaltjahr" Height = 255 Left = 960 TabIndex = 4 Top = 2280 Width = 1815 End Begin VB.Label Label1 Caption = "Jahr" Height = 255 Left = 960 TabIndex = 1 Top = 720 Width = 1455 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim mJahr As Integer Dim mSchaltjahr As Boolean Private Sub bsBerechnen_Click() przDatenuebernahme przBerechnung przDatenuebergabe End Sub Private Sub przDatenuebernahme() mJahr = CInt(tfJahr.Text) End Sub Private Sub przBerechnung() If Int(mJahr / 4) * 4 = mJahr _ Then If Int(mJahr / 100) * 100 = mJahr _ Then If Int(mJahr / 400) * 400 = mJahr _ Then mSchaltjahr = True Else mSchaltjahr = False End If Else mSchaltjahr = True End If Else mSchaltjahr = False End If End Sub Private Sub przDatenuebergabe() If mSchaltjahr = True _ Then tfSchaltjahr.Text = "Das Jahr ist ein Schaltjahr." Else tfSchaltjahr.Text = "Das Jahr ist kein Schaltjahr." End If End Sub