Bonjour!
Je crée une fiche sur un tableau excel, et je souhaiterais pouvoir generer un numero de fiche unique a chaque fois que j'ouvre ce document.
Sur word , j'avais cela:
Private Sub Codage()
If Left(Tables(1).Cell(2, 2).Range.Text, 9) = "ATTENTION" Then
Tables(1).Cell(2, 2).Range.Text = Format(Year(Now), "0#") & Format(Month(Now), "0#") _
& Format(Day(Now), "0#") & Format(Hour(Now), "0#") & Format(Minute(Now), "0#")
End If
End Sub
Mais je n'arrive pas à l'adapter a Excel.
est ce que quelqu'un pourrait m'aider?.. j'en ai marre de stagner!
merci!
Je crée une fiche sur un tableau excel, et je souhaiterais pouvoir generer un numero de fiche unique a chaque fois que j'ouvre ce document.
Sur word , j'avais cela:
Private Sub Codage()
If Left(Tables(1).Cell(2, 2).Range.Text, 9) = "ATTENTION" Then
Tables(1).Cell(2, 2).Range.Text = Format(Year(Now), "0#") & Format(Month(Now), "0#") _
& Format(Day(Now), "0#") & Format(Hour(Now), "0#") & Format(Minute(Now), "0#")
End If
End Sub
Mais je n'arrive pas à l'adapter a Excel.
est ce que quelqu'un pourrait m'aider?.. j'en ai marre de stagner!
merci!