Mart Thijssen
Gebruiker
- Lid geworden
- 30 mei 2001
- Berichten
- 5
Leuk vb maar het blijft puzzelen.
nu heb ik een leuke test macro gemaakt:
Sub Test2()
'
' Test2 Macro
' De macro is opgenomen op door Mart Thijssen.
'
'
Application.DisplayAlerts = False
Application.OnTime TimeValue("11:38:00 "), "persnlk.xls!Test2"
Application.OnTime TimeValue("11:39:00 "), "persnlk.xls!Test2"
Application.OnTime TimeValue("11:40:00 "), "persnlk.xls!Test2"
Application.OnTime TimeValue("11:41:00 "), "persnlk.xls!Test2"
Application.OnTime TimeValue("11:42:00 "), "persnlk.xls!Test2"
Application.OnTime EarliestTime:=TimeValue("11:38:00 "), _
Procedure:="persnlk.xls!Test2", Schedule:=False
Workbooks.Add
Range("A1").Select
ActiveCell.FormulaR1C1 = "test"
Range("B1").Select
ActiveCell.FormulaR1C1 = "1"
Range("A2").Select
With Selection.Interior
.ColorIndex = 45
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("B2").Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("C2").Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("A3").Select
With Selection.Interior
.ColorIndex = 50
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("B3").Select
With Selection.Interior
.ColorIndex = 5
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("C3").Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("C3").Select
ActiveCell.FormulaR1C1 = "stop"
Range("C3").Select
ActiveCell.FormulaR1C1 = "stop"
With ActiveCell.Characters(Start:=1, Length:=4).Font
.Name = "Arial"
.FontStyle = "Standaard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
Range("C3").Select
ActiveCell.FormulaR1C1 = "stop"
With ActiveCell.Characters(Start:=1, Length:=4).Font
.Name = "Arial"
.FontStyle = "Vet"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
Range("A5").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Columns("A:A").EntireColumn.AutoFit
Range("A5").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Range("F29").Select
ActiveWindow.Close
Application.DisplayAlerts = True
End Sub
De bedoeling was de da macro slecht een keer per genoemd tijdstip gestart /uitgevoerd wordt. Wat wil he geval hij wordt eerst 1 keer , bij het volgende tijdstip 2 x keer en dan 3 keer enz.
Hoe kan ik dit goed krijgen.
Alvast heeeeeeeeel hartelijk bedankt voor uw reactie
Mart
:8-0:
nu heb ik een leuke test macro gemaakt:
Sub Test2()
'
' Test2 Macro
' De macro is opgenomen op door Mart Thijssen.
'
'
Application.DisplayAlerts = False
Application.OnTime TimeValue("11:38:00 "), "persnlk.xls!Test2"
Application.OnTime TimeValue("11:39:00 "), "persnlk.xls!Test2"
Application.OnTime TimeValue("11:40:00 "), "persnlk.xls!Test2"
Application.OnTime TimeValue("11:41:00 "), "persnlk.xls!Test2"
Application.OnTime TimeValue("11:42:00 "), "persnlk.xls!Test2"
Application.OnTime EarliestTime:=TimeValue("11:38:00 "), _
Procedure:="persnlk.xls!Test2", Schedule:=False
Workbooks.Add
Range("A1").Select
ActiveCell.FormulaR1C1 = "test"
Range("B1").Select
ActiveCell.FormulaR1C1 = "1"
Range("A2").Select
With Selection.Interior
.ColorIndex = 45
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("B2").Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("C2").Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("A3").Select
With Selection.Interior
.ColorIndex = 50
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("B3").Select
With Selection.Interior
.ColorIndex = 5
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("C3").Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("C3").Select
ActiveCell.FormulaR1C1 = "stop"
Range("C3").Select
ActiveCell.FormulaR1C1 = "stop"
With ActiveCell.Characters(Start:=1, Length:=4).Font
.Name = "Arial"
.FontStyle = "Standaard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
Range("C3").Select
ActiveCell.FormulaR1C1 = "stop"
With ActiveCell.Characters(Start:=1, Length:=4).Font
.Name = "Arial"
.FontStyle = "Vet"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
Range("A5").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Columns("A:A").EntireColumn.AutoFit
Range("A5").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Range("F29").Select
ActiveWindow.Close
Application.DisplayAlerts = True
End Sub
De bedoeling was de da macro slecht een keer per genoemd tijdstip gestart /uitgevoerd wordt. Wat wil he geval hij wordt eerst 1 keer , bij het volgende tijdstip 2 x keer en dan 3 keer enz.
Hoe kan ik dit goed krijgen.
Alvast heeeeeeeeel hartelijk bedankt voor uw reactie
Mart
:8-0: