Sub sort_TL()
'
' sort_TL Macro
'
'
Sheets("input").Select
Range("A15:A1098").Select
Selection.Copy
Sheets("werkblad").Select
Range("B18").Select
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection.Font
.Name = "Arial"
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection.Font
.Name = "Arial"
.Size = 9
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Range("B18:X820").Select
Selection.Copy
Sheets("Aalst Mail").Select
Range("B18").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=-9
Range("D7").Select
Sheets("werkblad").Select
Dim oDic As Object, ws As Worksheet, i As Long, cl As Range, vKey As Variant
Set oDic = CreateObject("Scripting.Dictionary")
Set ws = Sheets("werkblad")
With Application
.ScreenUpdating = False
.DisplayAlerts = False
For i = Sheets.Count To 7 Step -1
If i > 1 Then Sheets(i).Delete
Next
For Each cl In ws.Range("AA14:AA" & ws.Cells(Rows.Count, 27).End(xlUp).Row)
[COLOR="#FF0000"]With oDic
.CompareMode = 1
If Not .exists(cl.Value) And cl.Value <> "" Then .Add cl.Value, 1
End With
Next cl[/COLOR]With oDic
For Each vKey In .Keys
Sheets.Add , Sheets(Sheets.Count)
With ActiveSheet
.Name = vKey
ws.Range("B13:AA" & ws.Cells(Rows.Count, 27).End(xlUp).Row).AutoFilter 26, vKey
ws.Range("B1:X13").Copy .Range("B1")
ws.AutoFilter.Range.Offset(1).Resize(, 23).SpecialCells(12).Copy .Range("B14")
.Columns.AutoFit
.Columns(1).ColumnWidth = 2
.UsedRange.RowHeight = 15
ws.Range("B17:AA" & ws.Cells(Rows.Count, 27).End(xlUp).Row).AutoFilter
ActiveSheet.Shapes.AddShape(msoShapeRoundedRectangle, 20, 5, 133.5, 22.5).Select
Selection.OnAction = "hsv_2"
Selection.Characters.Text = "Hoofdmenu"
Application.Goto .Range("A1")
End With
Next vKey
End With
Set oDic = Nothing: Set ws = Nothing
.DisplayAlerts = True
End With
End Sub
Sub hsv_2()
Application.Goto Sheets("hoofdmenu").Range("A1")
End Sub
Sheets("startpagina").Select
Columns("N:R").Select
Selection.EntireColumn.Hidden = True
Range("M12").Select
End Sub
Sub werkknop()
'
' werkknop Macro
'
'
Columns("M:S").Select
Selection.EntireColumn.Hidden = False
End Sub