Moderatori: Anthony47, Flash30005
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range
'
Set Rng = Range("A25:A500,e25:e500,g25:g500")
'
If Target.Value = "" Then Exit Sub
If Not Intersect(Target, Rng) Is Nothing And Target.Count = 1 Then
Application.EnableEvents = False
Target.Value = prova(Target.Value)
Application.EnableEvents = True
End If
'
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range, tVal As String
'
Set Rng = Range("A25:A500,e25:e500,g25:g500")
'
If Target.Value = "" Then Exit Sub
If Not Intersect(Target, Rng) Is Nothing And Target.Count = 1 Then
If IsNumeric(Replace(Target.Value, "/", "", , , vbTextCompare)) Then
Application.EnableEvents = False
tVal = Replace(Target.Value, "/", "", , , vbTextCompare)
On Error Resume Next
Target.Value = Format(DateValue((Left(tVal, 2) & "/" & Mid(tVal, 3, 2) & "/" & Mid(tVal, 5, 5))), "dd-mmm-yyyy")
' Target.Value = Format(DateValue(Left(tVal, 2) & "/" & Mid(tVal, 3, 2) & "/" & Mid(tVal, 5, 5)), "dd/mm/yyyy")
On Error GoTo 0
Application.EnableEvents = True
End If
End If
'
End Sub
Torna a Applicazioni Office Windows
Supporto per sviluppo macro VBA Ordinare per data Autore: Carletto Ribolla |
Forum: Applicazioni Office Windows Risposte: 3 |
Eliminare righe diverse dalla prima data del mese Autore: dipdip |
Forum: Applicazioni Office Windows Risposte: 4 |
Come impostare il formato data predefinito in excel? Autore: wallace&gromit |
Forum: Applicazioni Office Windows Risposte: 5 |
Macro sposta riga se data in colonna più vecchia di 3 mesi Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 23 |
Visitano il forum: Nessuno e 14 ospiti