Hi guys! could someone help me
I need a macro so I can create a buttom to stop another macro
this vba code will run this code every 15 minutes, but sometimes I need to turn off this macro and I want to do it whenever I want it
so how can I create another macro to stop that one?
I need a macro so I can create a buttom to stop another macro
this vba code will run this code every 15 minutes, but sometimes I need to turn off this macro and I want to do it whenever I want it
so how can I create another macro to stop that one?
VBA Code:
Sub COPIAR()
If Time < TimeValue("09:00:00") Or Time >= TimeValue("18:15:00") Then End
Sheets("Banco de Dados").Select
Range("A5:B5").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range(Selection, Selection.End(xlUp)).Select
Range("A6").Select
ActiveSheet.PasteSpecial Format:=3, Link:=1, DisplayAsIcon:=False, _
IconFileName:=False
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Range(Selection, Selection.End(xlToLeft)).Select
Range("A5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Call Temporizador
End Sub
Sub Temporizador()
'call a macro after 10 minutes
Call Application.OnTime(Now + TimeValue("00:00:05"), "COPIAR")
End Sub