Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

format heure > Excel2000/XP

3 réponses
Avatar
Frayer
Bjr,
Bien que =3D Format(Now, "h:mm"), je recois tjrs la date=20
complete dd/mm/yyyy hh:mm:ss dans ce case 2 ? Donc les=20
totaux et cumuls ne fonctionnent plus.
La cellule A etant la date, cela a-t-il une incidence sur=20
le comportement de la cellule B ?
MCI d'un l'eclairage (lampe au choix : incandescente,=20
petrole, gaz, a souder, a daire...meme iste ou ion)
---
Private Sub Worksheet_SelectionChange(ByVal Target As=20
Range)
If Target.Value <> "" Then
MsgBox ("D=E9j=E0 rempli !" & vbCrLf & "Already fitted")
Else
Select Case Target.Column
'1st click on cell A
Case 1: Target.Value =3D Format(Date, "dd mmm yyyy")
=20
'2nd click on cell B
'BUT the full date is coming : dd/mm/yy=20
hh:mm:ss !!!!
Case 2: Target.Value =3D Format(Now, "h:mm")
ActiveCell =3D Now - TimeSerial(0, 5, 0)
=20
'3rd click on cell C
'4th click on cell D
'5th click on cell E
Case 3, 4, 5: Target.Value =3D Format(Now, "h:mm")
End Select
End If

End Sub
'cell F =3DSUM(C-B)+(E-D)
'cell G =3D CUMUL (G from previous row)+F (ACTIVE ROW)

3 réponses

Avatar
ru-th
Salut

target= Time
target.NumberFormat = "h:mm"

ou + simple
target= Format(Time, "h:mm")

--
a+
rural thierry
Veaux et Broutards d'Anjou
Wicasa on kin nape yapi inahni yo (à l'essai)

"Frayer" a écrit dans le message de
news:639c01c40136$0b5d4460$
Bjr,
Bien que = Format(Now, "h:mm"), je recois tjrs la date
complete dd/mm/yyyy hh:mm:ss dans ce case 2 ? Donc les
totaux et cumuls ne fonctionnent plus.
La cellule A etant la date, cela a-t-il une incidence sur
le comportement de la cellule B ?
MCI d'un l'eclairage (lampe au choix : incandescente,
petrole, gaz, a souder, a daire...meme iste ou ion)
---
Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If Target.Value <> "" Then
MsgBox ("Déjà rempli !" & vbCrLf & "Already fitted")
Else
Select Case Target.Column
'1st click on cell A
Case 1: Target.Value = Format(Date, "dd mmm yyyy")

'2nd click on cell B
'BUT the full date is coming : dd/mm/yy
hh:mm:ss !!!!
Case 2: Target.Value = Format(Now, "h:mm")
ActiveCell = Now - TimeSerial(0, 5, 0)

'3rd click on cell C
'4th click on cell D
'5th click on cell E
Case 3, 4, 5: Target.Value = Format(Now, "h:mm")
End Select
End If

End Sub
'cell F =SUM(C-B)+(E-D)
'cell G = CUMUL (G from previous row)+F (ACTIVE ROW)
Avatar
FRAYER
M E R C I Thierry
Un blanc de Savoie au frais, au cas ou ?
-----Message d'origine-----
Salut

target= Time
target.NumberFormat = "h:mm"

ou + simple
target= Format(Time, "h:mm")

--
a+
rural thierry
Veaux et Broutards d'Anjou
Wicasa on kin nape yapi inahni yo (à l'essai)

"Frayer" a écrit
dans le message de

news:639c01c40136$0b5d4460$
Bjr,
Bien que = Format(Now, "h:mm"), je recois tjrs la date
complete dd/mm/yyyy hh:mm:ss dans ce case 2 ? Donc les
totaux et cumuls ne fonctionnent plus.
La cellule A etant la date, cela a-t-il une incidence sur
le comportement de la cellule B ?
MCI d'un l'eclairage (lampe au choix : incandescente,
petrole, gaz, a souder, a daire...meme iste ou ion)
---
Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If Target.Value <> "" Then
MsgBox ("Déjà rempli !" & vbCrLf & "Already fitted")
Else
Select Case Target.Column
'1st click on cell A
Case 1: Target.Value = Format(Date, "dd mmm yyyy")

'2nd click on cell B
'BUT the full date is coming : dd/mm/yy
hh:mm:ss !!!!
Case 2: Target.Value = Format(Now, "h:mm")
ActiveCell = Now - TimeSerial(0, 5, 0)

'3rd click on cell C
'4th click on cell D
'5th click on cell E
Case 3, 4, 5: Target.Value = Format(Now, "h:mm")
End Select
End If

End Sub
'cell F =SUM(C-B)+(E-D)
'cell G = CUMUL (G from previous row)+F (ACTIVE ROW)


.



Avatar
ru-th
je n'ai rien contre sombrer dans l'abyme ! ;-))

a+
rural thierry
"FRAYER" a écrit dans le message de
news: 691501c401ba$32a4ea30$
M E R C I Thierry
Un blanc de Savoie au frais, au cas ou ?
-----Message d'origine-----
Salut

target= Time
target.NumberFormat = "h:mm"

ou + simple
target= Format(Time, "h:mm")

--
a+
rural thierry
Veaux et Broutards d'Anjou
Wicasa on kin nape yapi inahni yo (à l'essai)

"Frayer" a écrit
dans le message de

news:639c01c40136$0b5d4460$
Bjr,
Bien que = Format(Now, "h:mm"), je recois tjrs la date
complete dd/mm/yyyy hh:mm:ss dans ce case 2 ? Donc les
totaux et cumuls ne fonctionnent plus.
La cellule A etant la date, cela a-t-il une incidence sur
le comportement de la cellule B ?
MCI d'un l'eclairage (lampe au choix : incandescente,
petrole, gaz, a souder, a daire...meme iste ou ion)
---
Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If Target.Value <> "" Then
MsgBox ("Déjà rempli !" & vbCrLf & "Already fitted")
Else
Select Case Target.Column
'1st click on cell A
Case 1: Target.Value = Format(Date, "dd mmm yyyy")

'2nd click on cell B
'BUT the full date is coming : dd/mm/yy
hh:mm:ss !!!!
Case 2: Target.Value = Format(Now, "h:mm")
ActiveCell = Now - TimeSerial(0, 5, 0)

'3rd click on cell C
'4th click on cell D
'5th click on cell E
Case 3, 4, 5: Target.Value = Format(Now, "h:mm")
End Select
End If

End Sub
'cell F =SUM(C-B)+(E-D)
'cell G = CUMUL (G from previous row)+F (ACTIVE ROW)


.