|
-
May 18th, 2001, 08:49 AM
#1
Thread Starter
Lively Member
? 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 ?
-
May 18th, 2001, 08:57 AM
#2
Addicted Member
Try...
Try dimensioning A & B as Long...
The biggest man you ever did see was once just a baby.
Bob Marley
-
May 18th, 2001, 09:02 AM
#3
Thread Starter
Lively Member
Sorry doesn`t work 
and rember debug.print DOES WORK !!!
-
May 18th, 2001, 09:03 AM
#4
Thread Starter
Lively Member
Sorry _Yoyo doesn`t work 
and rember debug.print DOES WORK !!!
-
May 18th, 2001, 09:11 AM
#5
?
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
-
May 18th, 2001, 09:19 AM
#6
Addicted Member
If you refresh the form it should work
label1.Caption=i/b
form1.Refresh
Cheers
-
May 18th, 2001, 09:28 AM
#7
oh I see now sorry, you'll need to set the AUTOREDRAW PROPERTY of the form to true for the label bit
-
May 18th, 2001, 09:36 AM
#8
Thread Starter
Lively Member
Thanks Pickler
works great
-
May 18th, 2001, 01:51 PM
#9
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..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|