Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Range(RangeChoisi).Select

6 réponses
Avatar
Jean-Paul V
Bonjour à tous,

Non sans mal j’arrive dans ma macro à définir le contenu de 2 cellules que
j’ai respectivement appelé Nom et DESTINATION, dans DESTINATION j’ai le nom
du champ où je veux aller .
Dim RangeChoisi As String
….
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
RangeChoisi = Range("DESTINATION").Value

Pourquoi aucune des 2 instructions qui suivent ne marche ?

Range(RangeChoisi).Select
Application.Goto Reference:=[Range("DESTINATION").Value ], Scroll:=True

Comment les corriger,je tourne en rond et j’ai du jardinage à faire…?

@+ j’espère

--
Jean-Paul V

6 réponses

Avatar
Philippe.R
Bonjour,
chez moi, cette syntaxe fonctionne pour atteindre l'adresse figurant une
cellule nommée DESTINATION :

Range([DESTINATION]).Select

--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le message
de news:
Bonjour à tous,

Non sans mal j’arrive dans ma macro à définir le contenu de 2 cellules que
j’ai respectivement appelé Nom et DESTINATION, dans DESTINATION j’ai le
nom
du champ où je veux aller .
Dim RangeChoisi As String
….
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
RangeChoisi = Range("DESTINATION").Value

Pourquoi aucune des 2 instructions qui suivent ne marche ?

Range(RangeChoisi).Select
Application.Goto Reference:=[Range("DESTINATION").Value ], Scroll:=True

Comment les corriger,je tourne en rond et j’ai du jardinage à faire…?

@+ j’espère

--
Jean-Paul V


Avatar
Jean-Paul V
Bonjour Philippe
Chez moi votre solution se plante (Excel 2000) erreur 1004 la methode Range
de l'objet_ Global a échoué
Pour faire le teste j'ai effacé le contenu de Nom et DESTINATION
Puis j'ai éxécuté la macro

Sub RetourMenu()
Dim c As Range, Noms As Range, Nom As Range, TABLE As Range,
DESTINATION As Range
With Sheets("Fonctions")
Set Noms = .[IMPRESSIONS].Resize(, 1)
For Each c In Noms
If Left(c.Offset(, 1), 11) = "=Procédure!" Then
If Not Intersect(Range(c.Value), ActiveCell) Is Nothing Then
Set Rg = Range(c.Value)
Exit For
End If
End If
Next c
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
Range([DESTINATION]).Select
End With
End Sub

Dans DESTINATION j'ai MENU mais votre Range([DESTINATION]).Select se plante
au lieu d'aller à MENU et MENU existe j'ai vérifié ???
--
Jean-Paul V


"Philippe.R" wrote:

Bonjour,
chez moi, cette syntaxe fonctionne pour atteindre l'adresse figurant une
cellule nommée DESTINATION :

Range([DESTINATION]).Select

--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le message
de news:
Bonjour à tous,

Non sans mal j’arrive dans ma macro à définir le contenu de 2 cellules que
j’ai respectivement appelé Nom et DESTINATION, dans DESTINATION j’ai le
nom
du champ où je veux aller .
Dim RangeChoisi As String
….
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
RangeChoisi = Range("DESTINATION").Value

Pourquoi aucune des 2 instructions qui suivent ne marche ?

Range(RangeChoisi).Select
Application.Goto Reference:=[Range("DESTINATION").Value ], Scroll:=True

Comment les corriger,je tourne en rond et j’ai du jardinage à faire…?

@+ j’espère

--
Jean-Paul V






Avatar
Philippe.R
Bonjour,
Peux tu publier ici, via cjoint, au moins un extrait du classeur
reproduisant le contexte ?
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le message
de news:
Bonjour Philippe
Chez moi votre solution se plante (Excel 2000) erreur 1004 la methode
Range
de l'objet_ Global a échoué
Pour faire le teste j'ai effacé le contenu de Nom et DESTINATION
Puis j'ai éxécuté la macro

Sub RetourMenu()
Dim c As Range, Noms As Range, Nom As Range, TABLE As Range,
DESTINATION As Range
With Sheets("Fonctions")
Set Noms = .[IMPRESSIONS].Resize(, 1)
For Each c In Noms
If Left(c.Offset(, 1), 11) = "=Procédure!" Then
If Not Intersect(Range(c.Value), ActiveCell) Is Nothing Then
Set Rg = Range(c.Value)
Exit For
End If
End If
Next c
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
Range([DESTINATION]).Select
End With
End Sub

Dans DESTINATION j'ai MENU mais votre Range([DESTINATION]).Select se
plante
au lieu d'aller à MENU et MENU existe j'ai vérifié ???
--
Jean-Paul V


"Philippe.R" wrote:

Bonjour,
chez moi, cette syntaxe fonctionne pour atteindre l'adresse figurant une
cellule nommée DESTINATION :

Range([DESTINATION]).Select

--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le
message
de news:
Bonjour à tous,

Non sans mal j’arrive dans ma macro à définir le contenu de 2 cellules
que
j’ai respectivement appelé Nom et DESTINATION, dans DESTINATION j’ai le
nom
du champ où je veux aller .
Dim RangeChoisi As String
….
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
RangeChoisi = Range("DESTINATION").Value

Pourquoi aucune des 2 instructions qui suivent ne marche ?

Range(RangeChoisi).Select
Application.Goto Reference:=[Range("DESTINATION").Value ], Scroll:=True

Comment les corriger,je tourne en rond et j’ai du jardinage à faire…?

@+ j’espère

--
Jean-Paul V








Avatar
Jean-Paul V
Bonjour,
http://cjoint.com/?enrz1Tqeu5
Dans le fichier j'ai laissé tout les noms de champ mais je me suis contenté
d'effacer le contenu des cellule.J'espère que cela nous vous gênera pas pour
la compréhension du fichier
@+ j'espère
--
Jean-Paul V


"Philippe.R" wrote:

Bonjour,
Peux tu publier ici, via cjoint, au moins un extrait du classeur
reproduisant le contexte ?
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le message
de news:
Bonjour Philippe
Chez moi votre solution se plante (Excel 2000) erreur 1004 la methode
Range
de l'objet_ Global a échoué
Pour faire le teste j'ai effacé le contenu de Nom et DESTINATION
Puis j'ai éxécuté la macro

Sub RetourMenu()
Dim c As Range, Noms As Range, Nom As Range, TABLE As Range,
DESTINATION As Range
With Sheets("Fonctions")
Set Noms = .[IMPRESSIONS].Resize(, 1)
For Each c In Noms
If Left(c.Offset(, 1), 11) = "=Procédure!" Then
If Not Intersect(Range(c.Value), ActiveCell) Is Nothing Then
Set Rg = Range(c.Value)
Exit For
End If
End If
Next c
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
Range([DESTINATION]).Select
End With
End Sub

Dans DESTINATION j'ai MENU mais votre Range([DESTINATION]).Select se
plante
au lieu d'aller à MENU et MENU existe j'ai vérifié ???
--
Jean-Paul V


"Philippe.R" wrote:

Bonjour,
chez moi, cette syntaxe fonctionne pour atteindre l'adresse figurant une
cellule nommée DESTINATION :

Range([DESTINATION]).Select

--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le
message
de news:
Bonjour à tous,

Non sans mal j’arrive dans ma macro à définir le contenu de 2 cellules
que
j’ai respectivement appelé Nom et DESTINATION, dans DESTINATION j’ai le
nom
du champ où je veux aller .
Dim RangeChoisi As String
….
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
RangeChoisi = Range("DESTINATION").Value

Pourquoi aucune des 2 instructions qui suivent ne marche ?

Range(RangeChoisi).Select
Application.Goto Reference:=[Range("DESTINATION").Value ], Scroll:=True

Comment les corriger,je tourne en rond et j’ai du jardinage à faire…?

@+ j’espère

--
Jean-Paul V












Avatar
Philippe.R
Bonsoir Jean-Paul

Fais le test chez toi avec ceci :

Sub essai()
Sheets("Menus").Activate
Range([DESTINATION]).Select
End Sub

qui semble montrer que ta macro devrait rouler en ajoutant la ligne :

Sheets("Menus").Activate

et se retrouver ainsi :

Sub RetourMenu()
Dim c As Range, Noms As Range, Nom As Range, TABLE As Range, DESTINATION As
Range
With Sheets("Fonctions")
Set Noms = .[IMPRESSIONS].Resize(, 1)
For Each c In Noms
If Left(c.Offset(, 1), 11) = "=Procédure!" Then
If Not Intersect(Range(c.Value), ActiveCell) Is Nothing Then
Set Rg = Range(c.Value)
Exit For
End If
End If
Next c
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
End With
Sheets("Menus").Activate
Range([DESTINATION]).Select
End Sub

--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le message
de news:
Bonjour,
http://cjoint.com/?enrz1Tqeu5
Dans le fichier j'ai laissé tout les noms de champ mais je me suis
contenté
d'effacer le contenu des cellule.J'espère que cela nous vous gênera pas
pour
la compréhension du fichier
@+ j'espère
--
Jean-Paul V


"Philippe.R" wrote:

Bonjour,
Peux tu publier ici, via cjoint, au moins un extrait du classeur
reproduisant le contexte ?
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le
message
de news:
Bonjour Philippe
Chez moi votre solution se plante (Excel 2000) erreur 1004 la methode
Range
de l'objet_ Global a échoué
Pour faire le teste j'ai effacé le contenu de Nom et DESTINATION
Puis j'ai éxécuté la macro

Sub RetourMenu()
Dim c As Range, Noms As Range, Nom As Range, TABLE As Range,
DESTINATION As Range
With Sheets("Fonctions")
Set Noms = .[IMPRESSIONS].Resize(, 1)
For Each c In Noms
If Left(c.Offset(, 1), 11) = "=Procédure!" Then
If Not Intersect(Range(c.Value), ActiveCell) Is Nothing Then
Set Rg = Range(c.Value)
Exit For
End If
End If
Next c
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
Range([DESTINATION]).Select
End With
End Sub

Dans DESTINATION j'ai MENU mais votre Range([DESTINATION]).Select se
plante
au lieu d'aller à MENU et MENU existe j'ai vérifié ???
--
Jean-Paul V


"Philippe.R" wrote:

Bonjour,
chez moi, cette syntaxe fonctionne pour atteindre l'adresse figurant
une
cellule nommée DESTINATION :

Range([DESTINATION]).Select

--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le
message
de news:
Bonjour à tous,

Non sans mal j’arrive dans ma macro à définir le contenu de 2
cellules
que
j’ai respectivement appelé Nom et DESTINATION, dans DESTINATION j’ai
le
nom
du champ où je veux aller .
Dim RangeChoisi As String
….
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
RangeChoisi = Range("DESTINATION").Value

Pourquoi aucune des 2 instructions qui suivent ne marche ?

Range(RangeChoisi).Select
Application.Goto Reference:=[Range("DESTINATION").Value ],
Scroll:=True

Comment les corriger,je tourne en rond et j’ai du jardinage à
faire…?

@+ j’espère

--
Jean-Paul V














Avatar
Jean-Paul V
Merci Philippe

Bizarrement la macro essai marche, mais si je complète la macro ça marche
pas donc j'appelle essai et là ça tourne merci encore !!!
--
Jean-Paul V


"Philippe.R" wrote:

Bonsoir Jean-Paul

Fais le test chez toi avec ceci :

Sub essai()
Sheets("Menus").Activate
Range([DESTINATION]).Select
End Sub

qui semble montrer que ta macro devrait rouler en ajoutant la ligne :

Sheets("Menus").Activate

et se retrouver ainsi :

Sub RetourMenu()
Dim c As Range, Noms As Range, Nom As Range, TABLE As Range, DESTINATION As
Range
With Sheets("Fonctions")
Set Noms = .[IMPRESSIONS].Resize(, 1)
For Each c In Noms
If Left(c.Offset(, 1), 11) = "=Procédure!" Then
If Not Intersect(Range(c.Value), ActiveCell) Is Nothing Then
Set Rg = Range(c.Value)
Exit For
End If
End If
Next c
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
End With
Sheets("Menus").Activate
Range([DESTINATION]).Select
End Sub

--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le message
de news:
Bonjour,
http://cjoint.com/?enrz1Tqeu5
Dans le fichier j'ai laissé tout les noms de champ mais je me suis
contenté
d'effacer le contenu des cellule.J'espère que cela nous vous gênera pas
pour
la compréhension du fichier
@+ j'espère
--
Jean-Paul V


"Philippe.R" wrote:

Bonjour,
Peux tu publier ici, via cjoint, au moins un extrait du classeur
reproduisant le contexte ?
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le
message
de news:
Bonjour Philippe
Chez moi votre solution se plante (Excel 2000) erreur 1004 la methode
Range
de l'objet_ Global a échoué
Pour faire le teste j'ai effacé le contenu de Nom et DESTINATION
Puis j'ai éxécuté la macro

Sub RetourMenu()
Dim c As Range, Noms As Range, Nom As Range, TABLE As Range,
DESTINATION As Range
With Sheets("Fonctions")
Set Noms = .[IMPRESSIONS].Resize(, 1)
For Each c In Noms
If Left(c.Offset(, 1), 11) = "=Procédure!" Then
If Not Intersect(Range(c.Value), ActiveCell) Is Nothing Then
Set Rg = Range(c.Value)
Exit For
End If
End If
Next c
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
Range([DESTINATION]).Select
End With
End Sub

Dans DESTINATION j'ai MENU mais votre Range([DESTINATION]).Select se
plante
au lieu d'aller à MENU et MENU existe j'ai vérifié ???
--
Jean-Paul V


"Philippe.R" wrote:

Bonjour,
chez moi, cette syntaxe fonctionne pour atteindre l'adresse figurant
une
cellule nommée DESTINATION :

Range([DESTINATION]).Select

--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/mpfe/connexion.php
News://news.microsoft.com/microsoft.public.fr.excel
"Jean-Paul V" a écrit dans le
message
de news:
Bonjour à tous,

Non sans mal j’arrive dans ma macro à définir le contenu de 2
cellules
que
j’ai respectivement appelé Nom et DESTINATION, dans DESTINATION j’ai
le
nom
du champ où je veux aller .
Dim RangeChoisi As String
….
Range("Nom").Value = [Rg].Name.Name
Range("DESTINATION").Value = "=VLOOKUP(NOM,TABLE,2,FALSE)"
RangeChoisi = Range("DESTINATION").Value

Pourquoi aucune des 2 instructions qui suivent ne marche ?

Range(RangeChoisi).Select
Application.Goto Reference:=[Range("DESTINATION").Value ],
Scroll:=True

Comment les corriger,je tourne en rond et j’ai du jardinage à
faire…?

@+ j’espère

--
Jean-Paul V