Bom dia ! faço um trabalho mensal de estoque, para gerar uma planilha com a curva ABC , quando extraio o arquivo do programa ele vem em Excel mais preciso fazer alguns ajustes tais como: mesclar e centralizar todo conteúdo quando gravo uma macro ela apresenta um erro, gostaria de saber como posso corrigir esse erro ...
Cells.Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlLTR
.MergeCells = True
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Cells.EntireRow.AutoFit
Cells.EntireColumn.AutoFit
ActiveSheet.Shapes.Range(Array("Picture 1025")).Select
Selection.Delete
Rows("1:15").Select
Range("A15").Activate
Selection.Delete Shift:=xlUp
Range("B1").Select
Selection.Cut
Range("A1").Select
ActiveSheet.Paste
Range("T1").Select
Selection.Cut
Range("U1").Select
ActiveSheet.Paste
Cells.Select
Range("G1").Activate
Cells.EntireColumn.AutoFit
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("A2:A1668" _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A1:Z1668")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWindow.SmallScroll Down:=-9
Range("C3").Select
End Sub
Atenciosamente,
Fernando Almeida
(11) 9 8765-8730 whats
Postado : 03/04/2017 7:19 am