Malcolm torishi
Board Regular
- Joined
- Apr 26, 2013
- Messages
- 219
I have the following Module that inserts a ticking clock, with the current time , on to a worksheet that is used to send automated emails once past a certain time. I also have a VBA Code that takes photos from my desktop and inserts them into the same spreadsheet based on the name of the saved phot name. Now what’s happen when both of these codes work together the whole work book, that has command buttons on the spreadsheet and the photos that have been inserted, starts to flickering. If I switch the module clock code off, “sub disable” below it does not flicker. The code for the clock is as below. Does any know why the spreadsheet flickers and is there anything that can be done to stop this flickering. I have tried to insert
Application.ScreenUpdating = False
Application.ScreenUpdating = True
at the beginning and end of VBA Code that insert the photos. But it’s not helped
If anyone could help it would be much appreciated, thank you
Dim SchedRecalc As Date
Sub Recalc()
With Sheet1.Range("Z4")
.Value = Format(Time, "hh:mm:ss AM/PM")
End With
Call Settime
End Sub
Sub Settime()
SchedRecalc = Now + TimeValue("00:00:01")
Application.OnTime SchedRecalc, "Recalc"
End Sub
Sub Disable()
On Error Resume Next
Application.OnTime EarliestTime:=SchedRecalc, Procedure:="Recalc", Schedule:=False
End Sub
Application.ScreenUpdating = False
Application.ScreenUpdating = True
at the beginning and end of VBA Code that insert the photos. But it’s not helped
If anyone could help it would be much appreciated, thank you
Dim SchedRecalc As Date
Sub Recalc()
With Sheet1.Range("Z4")
.Value = Format(Time, "hh:mm:ss AM/PM")
End With
Call Settime
End Sub
Sub Settime()
SchedRecalc = Now + TimeValue("00:00:01")
Application.OnTime SchedRecalc, "Recalc"
End Sub
Sub Disable()
On Error Resume Next
Application.OnTime EarliestTime:=SchedRecalc, Procedure:="Recalc", Schedule:=False
End Sub