Private Sub pause(ByVal interval As Variant) Dim Current As Variant Current = Timer Do While Timer - Current < Val(interval) DoEvents Loop End Sub
and i tried convert into this way :
Private Sub pause(ByVal interval As Single) Dim newDate As Date newDate = DateAndTime.Now.AddSeconds(interval) While DateAndTime.Now.Second <> newDate.Second Application.DoEvents() End While End Sub
It doesn't works.Could someone help me pointing where is the wrong?Thanks a lot guys..
