premvide = Range("A2:A" & Rows.Count).SpecialCells(xlCellTypeBlanks).Row
If PassWord.TextBox1.Value = Feuil6.Range("D4") Then 'access Mr XXX xxx
Feuil1.Unprotect
Feuil6.Unprotect
Feuil1.CommandButton1.Visible = True
Feuil1.Range("B1") = Feuil6.Range("C4")
Unload Me
'écrire dans l'historique
Feuil9.Unprotect
i = 2
While Feuil9.Cells(i, 1).Value <> ""
i = i + 1
Wend
Feuil9.Cells(i, 1).Value = "Read & DataWriting" 'Access
Feuil9.Cells(i, 2).Value = Feuil6.Range("C4") 'Login Mr XXX xxx
Feuil9.Cells(i, 3).Value = Feuil6.Range("D4") 'PassWord
Feuil9.Cells(i, 4).FormulaR1C1 = DateValue(Date) 'Date
Feuil9.Cells(i, 5).FormulaR1C1 = TimeValue(Time) 'Time
Feuil9.Cells(i, 6).Value = "Open Cession" 'Data Comments
With Selection.Font
.Color = -11489280
.TintAndShade = 0
End With
'Feuil9.Cells(i, 6).ColorIndex = 3 'cell red color
'Feuil9.Cells(i, 6).ColorIndex = 4 'cell green color
Feuil6.Range("E4").Value = Feuil6.Range("E4") + 1 'incrementation each login
Feuil6.Range("F4").Value = DateValue(Date) 'Date of the last connection
Feuil6.Range("G4").Value = TimeValue(Time) 'Time of the last connection
Feuil1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
Feuil6.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
Feuil6.EnableSelection = xlNoSelection
Feuil9.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
Feuil9.EnableSelection = xlNoSelection
Else
Feuil9.Cells(i, 6).Value = "Open Cession" 'Data Commentsce bout de code ne fonctionne pas apparement. pouvez-vous me montrer ou ais-je faux?
With Selection.Font
.Color = -11489280
.TintAndShade = 0
End With
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionFeuil9.Cells(i, 6).Value = "Open Cession" 'Data Comments
'Feuil9.Cells(i, 6).font.ColorIndex = 3 'cell red color
Feuil9.Cells(i, 6).Font.ColorIndex = 4 'cell green color