OVH Cloud OVH Cloud

sintillement après copie

2 réponses
Avatar
pellet15
Bonjour =E0 tous

Cette macros me permet de copier la donn=E9 qui est dans la cellule
active,
apr=E8s un double clic.

Cela va mais quoi ajouter pour que la cellule copier ne sintille pas a
mon retour
dans excel.

Merci

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
Dim Ligne, Valeur
Dim MyDataObject As DataObject
Dim NomFeuille As String
Donne =3D ActiveSheet.Name
Application.ScreenUpdating =3D False
With Worksheets("Courbe_usure")
.Activate
If Not Intersect(ActiveCell, .Range("c2:c500")) Is Nothing Then
If ActiveCell <> "" Then
ActiveCell.Copy
Cancel =3D True
MyAppID =3D Shell("C:\Program Files\Garmin\nRoute\nRoute.exe", 1)
SendKeys "{ESC}", True ' Envoie la combinaison escape pour ferm=E9
la fen=EAtre
SendKeys "{ESC}", True ' Envoie la combinaison escape pour ferm=E9
la fen=EAtre
SendKeys "{F4}", True ' Envoie la combinaison F4
SendKeys "{home}", True ' Envoie la combinaison w pour cat=E9gorie
Waypoints
SendKeys "^g", True
SendKeys "^v", True
SendKeys "{enter}", True
Set Pressp =3D Nothing
Application.ScreenUpdating =3D True
End If
End If
End With
End Sub

2 réponses

Avatar
JB
Bonjour,

Application.CutCopyMode = False

JB

Bonjour à tous

Cette macros me permet de copier la donné qui est dans la cellule
active,
après un double clic.

Cela va mais quoi ajouter pour que la cellule copier ne sintille pas a
mon retour
dans excel.

Merci

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
Dim Ligne, Valeur
Dim MyDataObject As DataObject
Dim NomFeuille As String
Donne = ActiveSheet.Name
Application.ScreenUpdating = False
With Worksheets("Courbe_usure")
.Activate
If Not Intersect(ActiveCell, .Range("c2:c500")) Is Nothing Then
If ActiveCell <> "" Then
ActiveCell.Copy
Cancel = True
MyAppID = Shell("C:Program FilesGarminnRoutenRoute.exe", 1)
SendKeys "{ESC}", True ' Envoie la combinaison escape pour fermé
la fenêtre
SendKeys "{ESC}", True ' Envoie la combinaison escape pour fermé
la fenêtre
SendKeys "{F4}", True ' Envoie la combinaison F4
SendKeys "{home}", True ' Envoie la combinaison w pour catégorie
Waypoints
SendKeys "^g", True
SendKeys "^v", True
SendKeys "{enter}", True
Set Pressp = Nothing
Application.ScreenUpdating = True
End If
End If
End With
End Sub


Avatar
pellet15
Bonjour JB

Très bien

Gros Merci