Hi Guys,
I use this code to run the three label1, label2, and label3.
The things is while the program is running, one digit number behind comma is not running constantly.
I meant when the numbers reach 10, 20, 30...the display is not 10.0, 20.0, 30.0,...
Can anyone helps to solve the code please?
Option Explicit
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub OneDigit()
Application.ScreenUpdating = False
Const valIncrement As Double = 1
Const valIncrement1 As Double = 0.1
Const valIncrement2 As Double = 0.6
Dim intmax As Integer
Dim intIndex As Integer
Dim intCalc As Double
Dim intCalc1 As Double
Dim intCalc2 As Double
intmax = 100
For intIndex = 1 To intmax
DoEvents
intCalc = intCalc + valIncrement
intCalc1 = intCalc1 + valIncrement1
intCalc2 = intCalc2 + valIncrement2
UserForm1.Label1 = Round(intCalc, 1)
UserForm1.Label2 = Round(intCalc1, 1)
UserForm1.Label3 = Round(intCalc2, 1)
Sleep 200
Next
Application.ScreenUpdating = True
End Sub
Thanks in advance and appreciate for any small helps and efforts.
Best Regards,
Iqbal
Bookmarks