Nilesh singh
New Member
- Joined
- Aug 18, 2017
- Messages
- 4
Hi,
I want to combine this two VBA. So that macro should be executed when conditions are met and on time allotted to it.
Private Sub Workbook_Open()
Application.OnTime TimeValue("00:08:00"), "Macro 1"
Application.OnTime TimeValue("00:08:02"), "Macro 2"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If IsNumeric(Target) And Target.Address = "$B$1" Then
Select Case Target.Value
Case Is < 5: Macro 1
Case Is > 5: Macro 2
End Select
End If
End Sub
I want to combine this two VBA. So that macro should be executed when conditions are met and on time allotted to it.
Private Sub Workbook_Open()
Application.OnTime TimeValue("00:08:00"), "Macro 1"
Application.OnTime TimeValue("00:08:02"), "Macro 2"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If IsNumeric(Target) And Target.Address = "$B$1" Then
Select Case Target.Value
Case Is < 5: Macro 1
Case Is > 5: Macro 2
End Select
End If
End Sub