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

Afficher tableau en vba

2 réponses
Avatar
Ayrton [ASC]
Bonsoir à tous,

J'aimerais avoir un petit coup de main pour connaître la syntaxe en vba
qui me permettrait d'afficher un tableau ; j'aimerai afficher un tableau
qui va de A1 à E10 mais je m'y perds un peu avec les lignes et les
colonnes.

Un grand merci d'avance pour votre aide

Bonne fin de soirée

Cordialement

--
@+
Christophe
http://cerbermail.com/?cUkbZNnG8H
Recherche dans les Archives :
http://groups.google.fr/group/microsoft.public.fr.windowsxp?hl=fr

2 réponses

Avatar
Oliv'
*Ayrton [ASC] que je salut a écrit *:
Bonsoir à tous,

J'aimerais avoir un petit coup de main pour connaître la syntaxe en
vba qui me permettrait d'afficher un tableau ; j'aimerai afficher un
tableau qui va de A1 à E10 mais je m'y perds un peu avec les lignes
et les colonnes.


Que veux tu dire par afficher un tableau ? ta feuille excel est un tableau !

tu veux mettre un quadrillage ?

Sub Macro1()
'
' Macro1 Macro
' Macro enregistrée le 25/09/2006 par Olivier CATTEAU
'

'
Range("A1:E10").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub


--
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have a nice day
Oliv'
Pour me joindre : http://cerbermail.com/?V8r2o1YHl4
les sites références:
Excel :http://www.excelabo.net http://xcell05.free.fr/
http://dj.joss.free.fr/
http://frederic.sigonneau.free.fr/ http://www.excel-vba-francais.com/
Word : http://faqword.free.fr/
Outlook : http://faq.outlook.free.fr/
les archives : http://groups.google.com/group/microsoft.public.fr.outlook
OE6 : http://www.faqoe.com/
Sql : http://sqlpro.developpez.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Avatar
Ayrton [ASC]
Bonjour *Oliv'*,
Dans ton message de news:,
Tu nous annonçais ce qui suit :-(*)

Que veux tu dire par afficher un tableau ? ta feuille excel est un
tableau !
tu veux mettre un quadrillage ?


Oui, c'est ça

Sub Macro1()
'
' Macro1 Macro
' Macro enregistrée le 25/09/2006 par Olivier CATTEAU
'

'
Range("A1:E10").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub


Merci beaucoup, c'est exactement ce que je voulais

--
@+
Christophe
http://cerbermail.com/?cUkbZNnG8H
Recherche dans les Archives :
http://groups.google.fr/group/microsoft.public.fr.windowsxp?hl=fr