Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Code does does not use With-End With

Sub selectionDemo()     Selection.HorizontalAlignment = xlCenter     Selection.VerticalAlignment = xlCenter     Selection.WrapText = True     Selection.Orientation = 0     Selection.ShrinkToFit = False     Selection.MergeCells = False          With Selection         .HorizontalAlignment = xlCenter         .VerticalAlignment = xlCenter         .WrapText = True         .Orientation = 0         .ShrinkToFit = False         .MergeCells = False     End With End Sub