Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la
nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision()
'
'
Sheets("EMPLOI DU TEMPS").Select
ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select
ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
End Sub
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Jacky
Bonsoir, '---------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '------------------- -- Salutations JJ
"Greg" a écrit dans le message de news:
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision() ' ' Sheets("EMPLOI DU TEMPS").Select ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) End Sub
Merci
Greg
Bonsoir,
'----------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Worksheets("E.T. détaillé").Activate
If Err <> 0 Then
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
ActiveSheet.Name = "E.T. détaillé"
Else:
MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante"
End If
End Sub
'-------------------
--
Salutations
JJ
"Greg" <debutant@free.fr> a écrit dans le message de news:
A9110B17-0B03-402F-8309-4E94CE9B7F20@microsoft.com...
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la
nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision()
'
'
Sheets("EMPLOI DU TEMPS").Select
ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select
ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
End Sub
Bonsoir, '---------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '------------------- -- Salutations JJ
"Greg" a écrit dans le message de news:
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision() ' ' Sheets("EMPLOI DU TEMPS").Select ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) End Sub
Merci
Greg
Jacky
Petite erreur ;o)) Pas dans le: "Private Sub Worksheet_SelectionChange(ByVal Target As Range)" Maie en sub '------------------ Sub precision() On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '----------------- -- Salutations JJ
"Jacky" a écrit dans le message de news: %
Bonsoir, '---------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '------------------- -- Salutations JJ
"Greg" a écrit dans le message de news:
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision() ' ' Sheets("EMPLOI DU TEMPS").Select ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) End Sub
Merci
Greg
Petite erreur ;o))
Pas dans le:
"Private Sub Worksheet_SelectionChange(ByVal Target As Range)"
Maie en sub
'------------------
Sub precision()
On Error Resume Next
Worksheets("E.T. détaillé").Activate
If Err <> 0 Then
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
ActiveSheet.Name = "E.T. détaillé"
Else:
MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante"
End If
End Sub
'-----------------
--
Salutations
JJ
"Jacky" <Dupond@marcel.fr> a écrit dans le message de news:
%23UUn1XRTKHA.1792@TK2MSFTNGP04.phx.gbl...
Bonsoir,
'----------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Worksheets("E.T. détaillé").Activate
If Err <> 0 Then
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
ActiveSheet.Name = "E.T. détaillé"
Else:
MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà
existante"
End If
End Sub
'-------------------
--
Salutations
JJ
"Greg" <debutant@free.fr> a écrit dans le message de news:
A9110B17-0B03-402F-8309-4E94CE9B7F20@microsoft.com...
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la
nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision()
'
'
Sheets("EMPLOI DU TEMPS").Select
ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select
ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
End Sub
Petite erreur ;o)) Pas dans le: "Private Sub Worksheet_SelectionChange(ByVal Target As Range)" Maie en sub '------------------ Sub precision() On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '----------------- -- Salutations JJ
"Jacky" a écrit dans le message de news: %
Bonsoir, '---------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '------------------- -- Salutations JJ
"Greg" a écrit dans le message de news:
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision() ' ' Sheets("EMPLOI DU TEMPS").Select ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) End Sub
Merci
Greg
Ptit Louis
Bonjour,
Juste avant le end sub, ajouter Activesheet.Name="E.T. dtaill"
"Greg" a écrit :
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la nouvelle feuille s'intitule "E.T. dtaill". Comment faire?
Sub precision() ' ' Sheets("EMPLOI DU TEMPS").Select ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) End Sub
Merci
Greg
Bonjour,
Juste avant le end sub, ajouter
Activesheet.Name="E.T. dtaill"
"Greg" a écrit :
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la
nouvelle feuille s'intitule "E.T. dtaill". Comment faire?
Sub precision()
'
'
Sheets("EMPLOI DU TEMPS").Select
ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select
ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
End Sub
Juste avant le end sub, ajouter Activesheet.Name="E.T. dtaill"
"Greg" a écrit :
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la nouvelle feuille s'intitule "E.T. dtaill". Comment faire?
Sub precision() ' ' Sheets("EMPLOI DU TEMPS").Select ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) End Sub
Merci
Greg
Greg
Bonsoir et merci Jacky pour ta réponse!
ça marche impec!
Greg
"Jacky" a écrit dans le message de news:
Petite erreur ;o)) Pas dans le: "Private Sub Worksheet_SelectionChange(ByVal Target As Range)" Maie en sub '------------------ Sub precision() On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '----------------- -- Salutations JJ
"Jacky" a écrit dans le message de news: %
Bonsoir, '---------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '------------------- -- Salutations JJ
"Greg" a écrit dans le message de news:
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision() ' ' Sheets("EMPLOI DU TEMPS").Select ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) End Sub
Merci
Greg
Bonsoir et merci Jacky pour ta réponse!
ça marche impec!
Greg
"Jacky" <Dupond@marcel.fr> a écrit dans le message de
news:e9PlvaRTKHA.1236@TK2MSFTNGP05.phx.gbl...
Petite erreur ;o))
Pas dans le:
"Private Sub Worksheet_SelectionChange(ByVal Target As Range)"
Maie en sub
'------------------
Sub precision()
On Error Resume Next
Worksheets("E.T. détaillé").Activate
If Err <> 0 Then
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
ActiveSheet.Name = "E.T. détaillé"
Else:
MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà
existante"
End If
End Sub
'-----------------
--
Salutations
JJ
"Jacky" <Dupond@marcel.fr> a écrit dans le message de news:
%23UUn1XRTKHA.1792@TK2MSFTNGP04.phx.gbl...
Bonsoir,
'----------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Worksheets("E.T. détaillé").Activate
If Err <> 0 Then
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
ActiveSheet.Name = "E.T. détaillé"
Else:
MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà
existante"
End If
End Sub
'-------------------
--
Salutations
JJ
"Greg" <debutant@free.fr> a écrit dans le message de news:
A9110B17-0B03-402F-8309-4E94CE9B7F20@microsoft.com...
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que
la nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision()
'
'
Sheets("EMPLOI DU TEMPS").Select
ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select
ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select
Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1)
End Sub
Petite erreur ;o)) Pas dans le: "Private Sub Worksheet_SelectionChange(ByVal Target As Range)" Maie en sub '------------------ Sub precision() On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '----------------- -- Salutations JJ
"Jacky" a écrit dans le message de news: %
Bonsoir, '---------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Worksheets("E.T. détaillé").Activate If Err <> 0 Then Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) ActiveSheet.Name = "E.T. détaillé" Else: MsgBox "La feuille" & vbLf & ActiveSheet.Name & vbLf & "est déjà existante" End If End Sub '------------------- -- Salutations JJ
"Greg" a écrit dans le message de news:
Bonjour,
Voici mon code qui copie ma feuille "emploi du temps". Je voudrais que la nouvelle feuille s'intitule "E.T. détaillé". Comment faire?
Sub precision() ' ' Sheets("EMPLOI DU TEMPS").Select ActiveSheet.Buttons.Add(1319.25, 192, 312, 51.75).Select ActiveSheet.Buttons.Add(1655.25, 26.25, 186, 213.75).Select Sheets("EMPLOI DU TEMPS").Copy Before:=Sheets(1) End Sub