HI ,
I have a code for getting increasing numbers in a cell.... that is .....
here in line 6 "If .Value >= 10 Then Exit Sub 'limit" i want to replace the value 10 by a cell reference in a sheet within the same work book so it can take the value " limit" from a cell.
Advance thanks.
I have a code for getting increasing numbers in a cell.... that is .....
Code:
Sub Count()
With ActiveSheet.Range("H7")
.Value = .Value + 1
Application.Wait (Now + TimeValue("00:00:01"))
ActiveSheet.PrintOut
If .Value >= 10 Then Exit Sub 'limit
End With
Application.OnTime Now + TimeValue("00:00:02"), "Count" 'every 2 seconds
End Sub
Advance thanks.
Last edited by a moderator: