Hello thanks... I found the mistake already, anyways the code is:
Option Explicit
Sub Curva_S()
Columns("B:IV").Select
Selection.Delete Shift:=xlToLeft
Dim LastCol As Long
With ActiveSheet
LastCol = .Range("a5").Value
Range("a1", .Cells(4, LastCol)).FillRight
End With
Rows("2:2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Rows("2:2").Select
Selection.Columns.autofit
End Sub
Before "End Sub" I had a "run application..." which I deleted and now it
works (the applications was a macro which changed)...
Thanks again to those that have helped me get this codes!