Double clic pour agrandir une feuille, comment inverser
3 réponses
pellet15
Bonjour =E0 tous
La macros suivante me permet d'agrandir une des 4 fen=EAtres qui sont
superposer a l'=E9cran.
Mais une fois quel est agrandie, si je double clic, je voudrait
inverser la r=E9duire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin
ActiveWorkbook.Unprotect
ActiveWindow.WindowState =3D xlMaximized
ActiveWorkbook.Protect Structure:=3DTrue, Windows:=3DTrue
fin:
Range("A2").Select
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
Philippe.R
Bonjour, Comme ceci ?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect If ActiveWindow.WindowState = xlNormal Then ActiveWindow.WindowState = xlMaximized Else ActiveWindow.WindowState = xlNormal End If ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").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 "pellet15" a écrit dans le message de news: Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect ActiveWindow.WindowState = xlMaximized ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").Select End Sub
Merci
Bonjour,
Comme ceci ?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin
ActiveWorkbook.Unprotect
If ActiveWindow.WindowState = xlNormal Then
ActiveWindow.WindowState = xlMaximized
Else
ActiveWindow.WindowState = xlNormal
End If
ActiveWorkbook.Protect Structure:=True, Windows:=True
fin:
Range("A2").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
"pellet15" <pellet15@videotron.ca> a écrit dans le message de
news:4eba8644-383a-4fcd-8836-b6f6affc5457@e1g2000pra.googlegroups.com...
Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont
superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait
inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin
ActiveWorkbook.Unprotect
ActiveWindow.WindowState = xlMaximized
ActiveWorkbook.Protect Structure:=True, Windows:=True
fin:
Range("A2").Select
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect If ActiveWindow.WindowState = xlNormal Then ActiveWindow.WindowState = xlMaximized Else ActiveWindow.WindowState = xlNormal End If ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").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 "pellet15" a écrit dans le message de news: Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect ActiveWindow.WindowState = xlMaximized ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").Select End Sub
Merci
pellet15
On 16 nov, 10:15, "Philippe.R" <AS_rauphil_chez_wanadoo.fr> wrote:
Bonjour, Comme ceci ?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect If ActiveWindow.WindowState = xlNormal Then ActiveWindow.WindowState = xlMaximized Else ActiveWindow.WindowState = xlNormal End If ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").Select End Sub
-- Avec plaisirhttp://dj.joss.free.fr/trombine.htmhttp://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 "pellet15" a écrit dans le message denews:4eba8 Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect ActiveWindow.WindowState = xlMaximized ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").Select End Sub
Merci
Gros Merci cela répond très bien
On 16 nov, 10:15, "Philippe.R" <AS_rauphil_chez_wanadoo.fr> wrote:
Bonjour,
Comme ceci ?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin
ActiveWorkbook.Unprotect
If ActiveWindow.WindowState = xlNormal Then
ActiveWindow.WindowState = xlMaximized
Else
ActiveWindow.WindowState = xlNormal
End If
ActiveWorkbook.Protect Structure:=True, Windows:=True
fin:
Range("A2").Select
End Sub
--
Avec plaisirhttp://dj.joss.free.fr/trombine.htmhttp://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
"pellet15" <pelle...@videotron.ca> a écrit dans le message denews:4eba8 644-383a-4fcd-8836-b6f6affc5457@e1g2000pra.googlegroups.com...
Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont
superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait
inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin
ActiveWorkbook.Unprotect
ActiveWindow.WindowState = xlMaximized
ActiveWorkbook.Protect Structure:=True, Windows:=True
fin:
Range("A2").Select
End Sub
On 16 nov, 10:15, "Philippe.R" <AS_rauphil_chez_wanadoo.fr> wrote:
Bonjour, Comme ceci ?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect If ActiveWindow.WindowState = xlNormal Then ActiveWindow.WindowState = xlMaximized Else ActiveWindow.WindowState = xlNormal End If ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").Select End Sub
-- Avec plaisirhttp://dj.joss.free.fr/trombine.htmhttp://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 "pellet15" a écrit dans le message denews:4eba8 Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect ActiveWindow.WindowState = xlMaximized ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").Select End Sub
Merci
Gros Merci cela répond très bien
michdenis
Si tu avais utilisé la forme négative comme dans :
If not Intersect(Target, Range("A2:m65536")) Is Nothing Then
Cela t'aurait évité d'utilser le Goto Fin
"Philippe.R" <AS_rauphil_chez_wanadoo.fr> a écrit dans le message de news: u67l%234$ Bonjour, Comme ceci ?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect If ActiveWindow.WindowState = xlNormal Then ActiveWindow.WindowState = xlMaximized Else ActiveWindow.WindowState = xlNormal End If ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").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 "pellet15" a écrit dans le message de news: Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect ActiveWindow.WindowState = xlMaximized ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").Select End Sub
Merci
Si tu avais utilisé la forme négative comme dans :
If not Intersect(Target, Range("A2:m65536")) Is Nothing Then
Cela t'aurait évité d'utilser le Goto Fin
"Philippe.R" <AS_rauphil_chez_wanadoo.fr> a écrit dans le message de news:
u67l%234$RJHA.3880@TK2MSFTNGP04.phx.gbl...
Bonjour,
Comme ceci ?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin
ActiveWorkbook.Unprotect
If ActiveWindow.WindowState = xlNormal Then
ActiveWindow.WindowState = xlMaximized
Else
ActiveWindow.WindowState = xlNormal
End If
ActiveWorkbook.Protect Structure:=True, Windows:=True
fin:
Range("A2").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
"pellet15" <pellet15@videotron.ca> a écrit dans le message de
news:4eba8644-383a-4fcd-8836-b6f6affc5457@e1g2000pra.googlegroups.com...
Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont
superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait
inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin
ActiveWorkbook.Unprotect
ActiveWindow.WindowState = xlMaximized
ActiveWorkbook.Protect Structure:=True, Windows:=True
fin:
Range("A2").Select
End Sub
Si tu avais utilisé la forme négative comme dans :
If not Intersect(Target, Range("A2:m65536")) Is Nothing Then
Cela t'aurait évité d'utilser le Goto Fin
"Philippe.R" <AS_rauphil_chez_wanadoo.fr> a écrit dans le message de news: u67l%234$ Bonjour, Comme ceci ?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect If ActiveWindow.WindowState = xlNormal Then ActiveWindow.WindowState = xlMaximized Else ActiveWindow.WindowState = xlNormal End If ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").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 "pellet15" a écrit dans le message de news: Bonjour à tous
La macros suivante me permet d'agrandir une des 4 fenêtres qui sont superposer a l'écran.
Mais une fois quel est agrandie, si je double clic, je voudrait inverser la réduire !!!
Comment modifier cette macro?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("A2:m65536")) Is Nothing Then GoTo fin ActiveWorkbook.Unprotect ActiveWindow.WindowState = xlMaximized ActiveWorkbook.Protect Structure:=True, Windows:=True fin: Range("A2").Select End Sub