-
? easy ?
Dim x As String
Dim i As Integer
Dim a, b
Open "e:\temp\dummy.tmp" For Append As 1
x = "x"
'1000 = 3000 bytes :)
'10000 = 30 kb ;)
a = 1000
b = a / 100
For i = 1 To a
Print #1, x
'Debug.Print i / b
label1.caption = i /b
Next i
Close 1
this code works fine but
label1.caption = i/b doesn`t work ! (it only displays 100
after it`s done)
debug.print does work !!!!
how do i make the label work ?
-
Try...
Try dimensioning A & B as Long...
-
Sorry doesn`t work :(
and rember debug.print DOES WORK !!!
-
Sorry _Yoyo doesn`t work :(
and rember debug.print DOES WORK !!!
-
? :confused:
Works For Me :
Code:
Private Sub Form_Load()
Dim x As String
Dim i As Integer
Dim a As Integer, b As Integer
Open "C:\Documents and Settings\lhrakr1\Desktop\dummy.tmp" For Append As #1
x = "x"
'1000 = 3000 bytes
'10000 = 30 kb
a = 1000
b = a / 100
For i = 1 To Int(a)
Print #1, x
' Debug.Print i / b
Label1.Caption = Int(i) / Int(b)
Next i
Close 1
End Sub
-
If you refresh the form it should work
label1.Caption=i/b
form1.Refresh
Cheers
-
oh I see now sorry, you'll need to set the AUTOREDRAW PROPERTY of the form to true for the label bit ;)
-
Thanks Pickler
works great
-
alex_read,
I just wanted to let you know that setting AutoRedraw to True does not fix the problem. I suggest you look over the documentation on AutoRedraw and try to understand it better..