- 13 Jun 2018 às 08:55
#33909
Prezados amigos,
Estou com um problema para executar dois Worksheet na mesma planilha. Gostaria do apoio de vcs para juntar os Worksheet descrito abaixo.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim hVal
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("b12:e42")) Is Nothing Then Exit Sub
With Target
hVal = Format(.Value, "0000")
If IsNumeric(hVal) And Len(hVal) = 4 Then
Application.EnableEvents = False
.Value = Left(hVal, 2) & ":" & Right(hVal, 2)
.NumberFormat = "[h]:mm"
End If
End With
Application.EnableEvents = True
End Sub
e
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$Q$6" Then
Range("B12:E42").ClearContents
Range("P12:p42").ClearContents
End If
End Sub
Estou com um problema para executar dois Worksheet na mesma planilha. Gostaria do apoio de vcs para juntar os Worksheet descrito abaixo.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim hVal
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("b12:e42")) Is Nothing Then Exit Sub
With Target
hVal = Format(.Value, "0000")
If IsNumeric(hVal) And Len(hVal) = 4 Then
Application.EnableEvents = False
.Value = Left(hVal, 2) & ":" & Right(hVal, 2)
.NumberFormat = "[h]:mm"
End If
End With
Application.EnableEvents = True
End Sub
e
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$Q$6" Then
Range("B12:E42").ClearContents
Range("P12:p42").ClearContents
End If
End Sub