JAMIR
Member
Hi,
I have added runing clock in my workbook.
Global clockOn As Boolean
Sub runClock()
Range("GatePass!L5").Value = Now()
If clockOn = True Then
Application.OnTime Now + TimeValue("00:00:01"), "runClock"
End If
End Sub
Sub startClock()
clockOn = True
runClock
End Sub
Sub stopClock()
clockOn = False
End Sub
My Clock is runing very fine only ., but only that workbook open. If i open 2nd excel file it gives
Run Time Error '1004':
Method range of object _Global failed.
I can not open 2nd excel file while those workbook open. If End clock stop working or if Debug it gives
Range("GatePass!L5").Value = Now()
What should i do?
Zameer Shaikh
I have added runing clock in my workbook.
Global clockOn As Boolean
Sub runClock()
Range("GatePass!L5").Value = Now()
If clockOn = True Then
Application.OnTime Now + TimeValue("00:00:01"), "runClock"
End If
End Sub
Sub startClock()
clockOn = True
runClock
End Sub
Sub stopClock()
clockOn = False
End Sub
My Clock is runing very fine only ., but only that workbook open. If i open 2nd excel file it gives
Run Time Error '1004':
Method range of object _Global failed.
I can not open 2nd excel file while those workbook open. If End clock stop working or if Debug it gives
Range("GatePass!L5").Value = Now()
What should i do?
Zameer Shaikh