Excel
Excel
(OP)
Hi,
I do not know how to align text in cells. I've been trying .... and nothing.
With Excel.Range("A1", "D5")
.Font.Bold = True
.Font.Name = "Tahoma"
.Font.Size = 12
.Font.ColorIndex = 3
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
Respect
Santa123
I do not know how to align text in cells. I've been trying .... and nothing.
With Excel.Range("A1", "D5")
.Font.Bold = True
.Font.Name = "Tahoma"
.Font.Size = 12
.Font.ColorIndex = 3
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
Respect
Santa123





RE: Excel
Did you tried to record a macro ?
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: Excel
This is code from recording macro in Excel
Best Regards
Santa123
RE: Excel
CODE --> vba
Sub Macro1() Range("A1:D5").Select With Selection .HorizontalAlignment = xlLeft .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With End SubRegards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: Excel
Range("F1,H1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
http://excelspreadsheetshelp.blogspot.com - http://scripting4v5.com
RE: Excel
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
in Catia script, it makes error.
RE: Excel
Const xlCenter = -4108
Const xlBottom = -4107
http://excelspreadsheetshelp.blogspot.com - http://scripting4v5.com
RE: Excel
.VerticalAlignment. These values -4108 and -4107, why not -11 and -10
Best Regards
Santa123