Hallo,
Wel het ging mis met mijn add-ins...
Je kan dit proberen, het kan wel heel lang duren om er volledig door te gaan. Proberen op een kopie!!!
Function ActualUsedRange()
Dim FirstCell As Range, LastCell As Range
Set LastCell = Cells(Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Row, _
Cells.Find(What:="*", SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Column)
Set FirstCell = Cells(Cells.Find(What:="*", After:=LastCell, SearchOrder:=xlRows, _
SearchDirection:=xlNext, LookIn:=xlValues).Row, _
Cells.Find(What:="*", After:=LastCell, SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, LookIn:=xlValues).Column)
ActualUsedRange = Range(FirstCell, LastCell).Address
End Function
Sub CleanSheet()
Dim intCount As Long
Dim strRange As String
Dim intLastCol As Integer
Dim intFirstCol As Integer
Application.ScreenUpdating = False
strRange = ActualUsedRange
intFirstCol = Columns(Split(strRange, "$")(3)).Column + 1
strRange = ActiveSheet.UsedRange.Address
intLastCol = Columns(Split(strRange, "$")(3)).Column
For intCount = intLastCol To intFirstCol Step -1
Columns(intCount).EntireColumn.Delete
Debug.Print intCount
Next intCount
Application.ScreenUpdating = False
End Sub