dans une feuille emploi du temp je selectionne dans une colonne pour coler
dans l'emploi du temps
voila ce que cela me donne sur l'evenement change
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then
ActiveCell.Copy
Exit Sub
End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = False
End If
End Sub
jusque la cela va tres bien, ca marche impec....
maintenant je voudrais pouvoir effacer mon emploi du temps du style
Range("C5:H16").ClearContents
mais evidemment avec Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
ca met la pagaille
merci de votre aide
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
michdenis
Bonjour Gérard,
Est-ce que cela répond à tes attentes ? J'en suis pas sûr ;-)
'------------------------------------ Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Not Intersect(Target, Range("K2:K7")) Is Nothing Then ActiveCell.Copy Exit Sub End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then If Application.CutCopyMode = 1 Then Application.EnableEvents = False ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False Application.EnableEvents = True Else Application.EnableEvents = False Range("C5:H16").ClearContents Application.EnableEvents = True End If End If
End Sub '------------------------------------
Salutations!
"Gerard" a écrit dans le message de news: 4364e5c7$0$1022$ Bonjour
dans une feuille emploi du temp je selectionne dans une colonne pour coler dans l'emploi du temps
voila ce que cela me donne sur l'evenement change
Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then ActiveCell.Copy Exit Sub End If If Not Intersect(Target, Range("C5:H16")) Is Nothing Then ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False End If
End Sub
jusque la cela va tres bien, ca marche impec....
maintenant je voudrais pouvoir effacer mon emploi du temps du style
Range("C5:H16").ClearContents mais evidemment avec Private Sub Worksheet_SelectionChange(ByVal Target As Range) ca met la pagaille merci de votre aide
Bonjour Gérard,
Est-ce que cela répond à tes attentes ? J'en suis pas sûr ;-)
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then
ActiveCell.Copy
Exit Sub
End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then
If Application.CutCopyMode = 1 Then
Application.EnableEvents = False
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = False
Application.EnableEvents = True
Else
Application.EnableEvents = False
Range("C5:H16").ClearContents
Application.EnableEvents = True
End If
End If
End Sub
'------------------------------------
Salutations!
"Gerard" <gege@microsoft.fr> a écrit dans le message de news: 4364e5c7$0$1022$8fcfb975@news.wanadoo.fr...
Bonjour
dans une feuille emploi du temp je selectionne dans une colonne pour coler
dans l'emploi du temps
voila ce que cela me donne sur l'evenement change
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then
ActiveCell.Copy
Exit Sub
End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = False
End If
End Sub
jusque la cela va tres bien, ca marche impec....
maintenant je voudrais pouvoir effacer mon emploi du temps du style
Range("C5:H16").ClearContents
mais evidemment avec Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
ca met la pagaille
merci de votre aide
Est-ce que cela répond à tes attentes ? J'en suis pas sûr ;-)
'------------------------------------ Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Not Intersect(Target, Range("K2:K7")) Is Nothing Then ActiveCell.Copy Exit Sub End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then If Application.CutCopyMode = 1 Then Application.EnableEvents = False ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False Application.EnableEvents = True Else Application.EnableEvents = False Range("C5:H16").ClearContents Application.EnableEvents = True End If End If
End Sub '------------------------------------
Salutations!
"Gerard" a écrit dans le message de news: 4364e5c7$0$1022$ Bonjour
dans une feuille emploi du temp je selectionne dans une colonne pour coler dans l'emploi du temps
voila ce que cela me donne sur l'evenement change
Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then ActiveCell.Copy Exit Sub End If If Not Intersect(Target, Range("C5:H16")) Is Nothing Then ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False End If
End Sub
jusque la cela va tres bien, ca marche impec....
maintenant je voudrais pouvoir effacer mon emploi du temps du style
Range("C5:H16").ClearContents mais evidemment avec Private Sub Worksheet_SelectionChange(ByVal Target As Range) ca met la pagaille merci de votre aide
Gerard
Bonjour et merci ca va Application.CutCopyMode = 1 il suffisait tout simplement de faire une condition si le presspapier contenanait quelque chose n'es ce pas je n'y avait pas pensé merci encore
"michdenis" a écrit dans le message de news:
Bonjour Gérard,
Est-ce que cela répond à tes attentes ? J'en suis pas sûr ;-)
'------------------------------------ Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Not Intersect(Target, Range("K2:K7")) Is Nothing Then ActiveCell.Copy Exit Sub End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then If Application.CutCopyMode = 1 Then Application.EnableEvents = False ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False Application.EnableEvents = True Else Application.EnableEvents = False Range("C5:H16").ClearContents Application.EnableEvents = True End If End If
End Sub '------------------------------------
Salutations!
"Gerard" a écrit dans le message de news: 4364e5c7$0$1022$ Bonjour
dans une feuille emploi du temp je selectionne dans une colonne pour coler dans l'emploi du temps
voila ce que cela me donne sur l'evenement change
Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then ActiveCell.Copy Exit Sub End If If Not Intersect(Target, Range("C5:H16")) Is Nothing Then ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False End If
End Sub
jusque la cela va tres bien, ca marche impec....
maintenant je voudrais pouvoir effacer mon emploi du temps du style
Range("C5:H16").ClearContents mais evidemment avec Private Sub Worksheet_SelectionChange(ByVal Target As Range) ca met la pagaille merci de votre aide
Bonjour et merci
ca va
Application.CutCopyMode = 1
il suffisait tout simplement de faire une condition si le presspapier
contenanait quelque chose
n'es ce pas
je n'y avait pas pensé
merci encore
"michdenis" <michdenis@hotmail.com> a écrit dans le message de news:
e43mWiW3FHA.3136@TK2MSFTNGP09.phx.gbl...
Bonjour Gérard,
Est-ce que cela répond à tes attentes ? J'en suis pas sûr ;-)
'------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then
ActiveCell.Copy
Exit Sub
End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then
If Application.CutCopyMode = 1 Then
Application.EnableEvents = False
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = False
Application.EnableEvents = True
Else
Application.EnableEvents = False
Range("C5:H16").ClearContents
Application.EnableEvents = True
End If
End If
End Sub
'------------------------------------
Salutations!
"Gerard" <gege@microsoft.fr> a écrit dans le message de news:
4364e5c7$0$1022$8fcfb975@news.wanadoo.fr...
Bonjour
dans une feuille emploi du temp je selectionne dans une colonne pour coler
dans l'emploi du temps
voila ce que cela me donne sur l'evenement change
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then
ActiveCell.Copy
Exit Sub
End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then
ActiveCell.PasteSpecial xlPasteAll
Application.CutCopyMode = False
End If
End Sub
jusque la cela va tres bien, ca marche impec....
maintenant je voudrais pouvoir effacer mon emploi du temps du style
Range("C5:H16").ClearContents
mais evidemment avec Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
ca met la pagaille
merci de votre aide
Bonjour et merci ca va Application.CutCopyMode = 1 il suffisait tout simplement de faire une condition si le presspapier contenanait quelque chose n'es ce pas je n'y avait pas pensé merci encore
"michdenis" a écrit dans le message de news:
Bonjour Gérard,
Est-ce que cela répond à tes attentes ? J'en suis pas sûr ;-)
'------------------------------------ Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next If Not Intersect(Target, Range("K2:K7")) Is Nothing Then ActiveCell.Copy Exit Sub End If
If Not Intersect(Target, Range("C5:H16")) Is Nothing Then If Application.CutCopyMode = 1 Then Application.EnableEvents = False ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False Application.EnableEvents = True Else Application.EnableEvents = False Range("C5:H16").ClearContents Application.EnableEvents = True End If End If
End Sub '------------------------------------
Salutations!
"Gerard" a écrit dans le message de news: 4364e5c7$0$1022$ Bonjour
dans une feuille emploi du temp je selectionne dans une colonne pour coler dans l'emploi du temps
voila ce que cela me donne sur l'evenement change
Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next
If Not Intersect(Target, Range("K2:K7")) Is Nothing Then ActiveCell.Copy Exit Sub End If If Not Intersect(Target, Range("C5:H16")) Is Nothing Then ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False End If
End Sub
jusque la cela va tres bien, ca marche impec....
maintenant je voudrais pouvoir effacer mon emploi du temps du style
Range("C5:H16").ClearContents mais evidemment avec Private Sub Worksheet_SelectionChange(ByVal Target As Range) ca met la pagaille merci de votre aide