Workbooks.OpenText Filename:="H:\dagrooster\dagrooster.TXT", Origin _
:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote _
, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:= _
False, Space:=False, Other:=True, OtherChar:=";", FieldInfo:=Array( _
Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), _
Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array(14, _
1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1), Array(19, 1), Array(20, 1)), _
TrailingMinusNumbers:=True
Range("A:A,D

,E:E,P

,Q:Q,R:R,S:S,N:N").Select
Range("N1").Activate
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Selection.Copy
Columns("L:L").Select
ActiveSheet.Paste
Columns("K:K").Select
Application.CutCopyMode = False
Selection.Cut
Columns("A:A").Select
ActiveSheet.Paste
Columns("C

").Select
Selection.Copy
Columns("O:O").Select
ActiveSheet.Paste
Columns("E:F").Select
Application.CutCopyMode = False
Selection.Copy
Columns("C:C").Select
ActiveSheet.Paste
Columns("I:J").Select
Application.CutCopyMode = False
Selection.Copy
Columns("E:E").Select
ActiveSheet.Paste
Columns("P

").Select
Application.CutCopyMode = False
Selection.Copy
Columns("G:G").Select
ActiveSheet.Paste
Columns("O:O").Select
Application.CutCopyMode = False
Selection.Copy
Columns("H:H").Select
ActiveSheet.Paste
Columns("I:K").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Columns("J:M").Select
Selection.Delete Shift:=xlToLeft
Columns("A:I").Select
Selection.Sort Key1:=Range("I5"), Order1:=xlAscending, _
Key2:=Range("A5"), Order2:=xlAscending, _
Key3:=Range("B5"), Order3:=xlAscending, Header:=xlGuess, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Range("A3").Select
ActiveCell.FormulaR1C1 = "klas"
Range("B3").Select
ActiveCell.FormulaR1C1 = "lesuur"
Range("C3").Select
ActiveCell.FormulaR1C1 = "vak"
Range("D3").Select
ActiveCell.FormulaR1C1 = "vak"
Range("E3").Select
ActiveCell.FormulaR1C1 = "lokaal"
Range("F3").Select
ActiveCell.FormulaR1C1 = "lokaal"
Range("G3").Select
ActiveCell.FormulaR1C1 = "invaldocent"
Range("H3").Select
ActiveCell.FormulaR1C1 = "docent"
Range("H3").Select
Columns("G:G").EntireColumn.AutoFit
Range("E3").Select
ActiveCell.FormulaR1C1 = "invallokaal"
Range("D3").Select
ActiveCell.FormulaR1C1 = "invalvak"
Range("A1").Select
ActiveCell.FormulaR1C1 = "ROOSTERWIJZIGING"
Cells.Select
With Selection.Font
.Name = "Arial"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("A1").Select
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Columns("A:H").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("A1").Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("A3:H3").Select
Selection.Font.Bold = True
Selection.ColumnWidth = 11
Range("F3").Select
ActiveCell.FormulaR1C1 = "invallokaal"
Range("E3").Select
ActiveCell.FormulaR1C1 = "lokaal"
Range("G3").Select
Columns("G:G").EntireColumn.AutoFit
End Sub
dit is de macro
een snelkoppelingstoets is welke toets je moet indrukken voordat de macro gestart wordt bijvoorbeeld ctrl+p
groeten