VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 3015 ClientLeft = 120 ClientTop = 465 ClientWidth = 4560 LinkTopic = "Form1" ScaleHeight = 3015 ScaleWidth = 4560 StartUpPosition = 3 'Windows-Standard Begin VB.TextBox Text1 Height = 1935 Left = 3600 MultiLine = -1 'True TabIndex = 3 Text = "For_Next.frx":0000 Top = 720 Width = 735 End Begin VB.CommandButton Command2 Caption = "Command2" Height = 495 Left = 1440 TabIndex = 1 Top = 2280 Width = 1695 End Begin VB.CommandButton Command1 Caption = "Command1" Height = 495 Left = 1440 TabIndex = 0 Top = 1560 Width = 1695 End Begin VB.Label Label1 Caption = "Label1" BeginProperty Font Name = "Verdana" Size = 26.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Left = 1320 TabIndex = 2 Top = 360 Width = 1815 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim x As Integer Dim y As Integer Private Declare Function WaitForSingleObject Lib "kernel32" ( _ ByVal hHandle As Long, _ ByVal dwMilliseconds As Long) As Long Public Function Wait(ByVal mSek As Long) WaitForSingleObject -1, mSek End Function Private Sub Command1_Click() x = 1: y = 1 For y = 1 To 5 Step 1 Label1.Caption = x Text1.Text = x Wait 1000: '1000 Millisekunden warten. x = x + 1 Next y End Sub Private Sub Form_Load() x = 1 y = 1 End Sub