G
Guest
Hi,
the format of cell p_1 is "dd-mm-yy hh:mm"
this procedure running inputbox:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim row As Integer
Range("p_1").Select
With ActiveCell.NumberFormat = "dd-MM-yy hh:mm"
End With
If Target.row = 3 And Target.Column = 2 And Range("p_1").Value = "" Or
Range("p_1").Value = 0 Then _
: Range("p_1").Value = InputBox("Wpisz datÄ™" & vbNewLine & vbNewLine &
"PoczÄ…tkowÄ…" & vbNewLine & vbNewLine & "Delegacji PL:")
Range("K_1").Select
With ActiveCell.NumberFormat = "dd-MM-yy h:mm"
End With
If Target.row = 3 And Target.Column = 3 And Range("K_1").Value = "" Or
Range("K_1").Value = 0 Then _
: Range("K_1").Value = InputBox("Wpisz datÄ™" & vbNewLine & vbNewLine &
"Końcową" & vbNewLine & vbNewLine & "Delegacji PL:")
End Sub
!!! however, input box changing format of cell p_1 to "mm-dd-yy hh:mm" !!!
what should I declare, to write correctly date in cell p_1 ???
thx in advance
Artur
the format of cell p_1 is "dd-mm-yy hh:mm"
this procedure running inputbox:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim row As Integer
Range("p_1").Select
With ActiveCell.NumberFormat = "dd-MM-yy hh:mm"
End With
If Target.row = 3 And Target.Column = 2 And Range("p_1").Value = "" Or
Range("p_1").Value = 0 Then _
: Range("p_1").Value = InputBox("Wpisz datÄ™" & vbNewLine & vbNewLine &
"PoczÄ…tkowÄ…" & vbNewLine & vbNewLine & "Delegacji PL:")
Range("K_1").Select
With ActiveCell.NumberFormat = "dd-MM-yy h:mm"
End With
If Target.row = 3 And Target.Column = 3 And Range("K_1").Value = "" Or
Range("K_1").Value = 0 Then _
: Range("K_1").Value = InputBox("Wpisz datÄ™" & vbNewLine & vbNewLine &
"Końcową" & vbNewLine & vbNewLine & "Delegacji PL:")
End Sub
!!! however, input box changing format of cell p_1 to "mm-dd-yy hh:mm" !!!
what should I declare, to write correctly date in cell p_1 ???
thx in advance
Artur