Boostez vos compétences Excel avec notre communauté !
Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force.
Apprenez, échangez, progressez – et tout ça gratuitement !
👉 Inscrivez-vous maintenant !
Bonjour @Dudu2
ceci fonctionne aussi et c'est même plus précis
VB:
'Centrer la Shape en largeurIf LeftPoints = xlNone ThenWith Application
Shape.Left =.Left +(.UsableWidth - Shape.Width)/2EndWithElse
Shape.Left = LeftPoints
EndIf'Centrer la Shape en hauteurIf TopPoints = xlNone ThenWith Application
Shape.Top =.Top +(.UsableHeight - Shape.Height)/2EndWithElse
Shape.Top = TopPoints
EndIf
petite demo
VB:
Sub Bouton6_Cliquer()Dim rng As Range, t AsStringSet rng = ActiveWindow.VisibleRange
t ="viblerange :"& rng.Address(0,0)&" : "& rng.Width &" points"& vbCr & vbCr
t = t &" si tu regarde bien la colonne "& rng.Cells(rng.Cells.Count).EntireColumn.Address(0,0)& vbCr
t = t &" tu verra quelle n'est pas completement visible "& vbCr & vbCr
t = t &" usableWidth de l'application :"& Application.UsableWidth &" points"
MsgBox t
EndSub
- Navigue sans publicité - Accède à Cléa, notre assistante IA experte Excel... et pas que... - Profite de fonctionnalités exclusives Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel. Je deviens Supporter XLD