0
Private Sub Command1_Click()
Dim i As Integer, j As Integer
For i = 1 To 10000
For j = 1 To 10000
Print "SDFGH========="; j
Next j
Next i

End Sub

when i click on command1, i want to view the enitre execution of loop,i.e, from

SDGGH=============1
                      SDFGH=============2
                      .
                      .
            till.......SDFGH============10000

in separate lines but form is too small and it displays only till ...
SDFGH=============42
please help...

Edited by Nick Evan: Fixed code-tags

3
Contributors
2
Replies
5
Views
7 Years
Discussion Span
Last Post by AndreRet
0

something like...

If j Mod 42 = 0 Then Me.cls
Print ...

This will clear the form of the printing you have done to it and reset the currentx and currenty properties to 0. Look it up in help to make sure you use it right if you are manipulating the forms autoredraw property.

Good Luck

0

You can also try and the loop to a list box -

Private Sub Command1_Click()Dim i As Integer, j As Integer
For i = 1 To 10000
For j = 1 To 10000
Print "SDFGH=========";j
List1.AddItem j   'Or the like
Next j
Next i 
End Sub

If this is not working for you and you want to print to your form, use a scrollable form. I have add a attachment with code on how to create such a form.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.