GNT sans publicité, site mobile, fonctionnalitées exclusives...

double clic pour deux procédure

Le
pellet15
Bonjour
Les macros suivante me permet de voir (en double clis sur une cellule
en "h15 à h500")
avec maps.google.(les cellules contiennent des donnés Longitude
Latitude.)

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
Cancel = True
Dim adresse As String
If Not Intersect(Target, Range("h15:h500")) Is Nothing Then
If Target.Cells.Count = 1 And Target.Value <> "" Then
adresse = "http://maps.google.com/maps?q=" & Target.Offset(, 3)
& "&t=h&hl=fr"
Internet adresse
End If
End If
End Sub
Sub Internet(adresse As String)
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Visible = True: IE.Top = 0: IE.Left = 0
IE.Navigate adresse
End Sub

Je voudrai faire exécuter la procédure suivante en double clic su
"i15:i500".
comment l'intègré dans la première macro???

MyAppID = Shell("C:\Program Files\GarminRouteRoute.exe", 1)
SendKeys "{ESC}", True
SendKeys "{ESC}", True
SendKeys "{F4}", True
SendKeys "{home}", True
SendKeys "^g", True
SendKeys "^v", True
SendKeys "{enter}", True
Set Pressp = Nothing
Application.ScreenUpdating = True


Merci
Lire les 2 réponses

Vidéos High-Tech et Jeu Vidéo
Téléchargements
Vos réponses
Gagnez chaque mois un abonnement Premium avec GNT : Inscrivez-vous !
Trier par : date / pertinence
Daniel
Le #3649391
Bonsoir.
Si j'ai bien compris le sens de ta question :

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Range("h15:h500")) Is Nothing Then
'*** première procédure
ElseIf Not Intersect(Target, Range("h15:h500")) Is Nothing Then
'*** seconde procédure
End If
End Sub

Cordialement.
Daniel
"pellet15"
Bonjour
Les macros suivante me permet de voir (en double clis sur une cellule
en "h15 à h500")
avec maps.google.(les cellules contiennent des donnés Longitude
Latitude.)

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
Cancel = True
Dim adresse As String
If Not Intersect(Target, Range("h15:h500")) Is Nothing Then
If Target.Cells.Count = 1 And Target.Value <> "" Then
adresse = "http://maps.google.com/maps?q=" & Target.Offset(, 3)
& "&t=h&hl=fr"
Internet adresse
End If
End If
End Sub
Sub Internet(adresse As String)
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Visible = True: IE.Top = 0: IE.Left = 0
IE.Navigate adresse
End Sub

Je voudrai faire exécuter la procédure suivante en double clic su
"i15:i500".
comment l'intègré dans la première macro???

MyAppID = Shell("C:Program FilesGarminnRoutenRoute.exe", 1)
SendKeys "{ESC}", True
SendKeys "{ESC}", True
SendKeys "{F4}", True
SendKeys "{home}", True
SendKeys "^g", True
SendKeys "^v", True
SendKeys "{enter}", True
Set Pressp = Nothing
Application.ScreenUpdating = True


Merci
pellet15
Le #3649201
Bonsoir Daniel

J'ai bricoler cette macros mais seulement lorsque je double clic sur
colonne h que
maps.google s'exécute mais je voudrai aussi que lorsque je double clic
sur la colonne i
s'exécuter le programe de Garmin.
Ou est mon erreur??

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
Cancel = True
Dim adresse As String
If Not Intersect(Target, Range("h15:h500")) Is Nothing Then
If Target.Cells.Count = 1 And Target.Value <> "" Then
adresse = "http://maps.google.com/maps?q=" & Target.Offset(, 3)
& "&t=h&hl=fr"
Internet adresse
ElseIf Not Intersect(Target, Range("i15:i500")) Is Nothing Then
ActiveCell.Offset(0, 3).Copy
MyAppID = Shell("C:Program FilesGarminnRoutenRoute.exe", 1)
SendKeys "{ESC}", True
SendKeys "{ESC}", True
SendKeys "{F4}", True
SendKeys "{home}", True
SendKeys "^g", True
SendKeys "^v", True
SendKeys "{enter}", True
Set Pressp = Nothing
Application.ScreenUpdating = True
End If
End If
End Sub
Sub Internet(adresse As String)
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Visible = True: IE.Top = 0: IE.Left = 0
IE.Navigate adresse
End Sub

Merci
Publicité
Suivre les réponses
Poster une réponse
Anonyme