Merci
J'ai testé mais quand je fais déplacer ou copier
Ensuite créér un onglet
Ca ne marche pas ???!!!
Et en parlant des feuilles masqués est il possible que toutes les 5 feuilles
ca se masque?
"Youky" <nospam.bruno.jeune***wanadoo.fr> a écrit dans le message de news:
ujLGb086IHA.5820***TK2MSFTNGP04.phx.gbl...
> Le rajout indiqué hier soir n'était pas correct, voici avec amélioration.
> Si tu n'as pas d'onglets de masqué il te faut supprimer le -1 à
> Sheets(Sheets.Count - 1).......aux 2 lignes
> Youky
>
> Sheets("Feuil1").Copy After:=Sheets(Sheets.Count)
> fichier = ThisWorkbook.Name
> Dim nf As String
> an = Right(Year(Now), 2)
> chemin = ThisWorkbook.Path
> On Error Resume Next
> canal = FreeFile
> Open chemin & "\N°facture.txt" For Input As #canal
> Input #canal, nf
> Close #canal
> If Left(nf, 2) = an Then
> nf = CStr(an) & CStr(Right(nf + 1001, 3))
> Else
> nf = CStr(an) & CStr("001")
> End If
> Sheets(Sheets.Count - 1).[F12] = "D/" & an & "/" & Right(nf + 1001, 3)
> Sheets(Sheets.Count - 1).Name = "D" & an & "_" & Right(nf + 1001, 3)
> Open chemin & "\N°facture.txt" For Output As #canal
> Print #canal, nf
> Close #canal
>
>>
>>
>
>