Wartebefehl ändert nichts; hier der Code
12.07.2002 15:40:11
Michael Kl.
Hallo ihr beiden.
Der Hinweis von Hans bringt leider nichts. Das Dokument wird zwar gedruckt, aber während des Ausblendens der Zellen stürzt Excel weiter ab.
Hier der Quelltext zum Verständnis:Das zusammenfassende Makro:
Sub Makro1()
'
' Makro1 Makro
' Makro am 12.07.02 von Michael aufgezeichnet
'
'
Application.Run "'TT-TurnierMichael.xls'!Vergleich_einblenden"
Application.Wait Now + TimeSerial(0, 0, 3)
Application.Run "'TT-TurnierMichael.xls'!spielplan_drucken"
Application.Wait Now + TimeSerial(0, 0, 3)
Application.Run "'TT-TurnierMichael.xls'!Vergleich_ausblenden"
End Sub
Sub Vergleich_einblenden()
'
' Vergleich_einblenden Makro
' Makro am 19.06.02 von Michael aufgezeichnet
'
'
ActiveSheet.Unprotect ""
Range("Y3:AE3").Select
Selection.EntireColumn.Hidden = False
Range("A3").Select
Range("H14:X24").Select
Selection.Font.ColorIndex = 0
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Range("H14:X14").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("H14:J24,K14:M24,N14:P24,Q14:S24,T14:X24").Select
Range("T14").Activate
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("T14:X24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
ActiveWindow.SmallScroll Down:=-15
Range("A3").Select
ActiveSheet.Protect ""
End Sub
Sub Spielplan_Drucken()
'
' Spielplan_Drucken Makro
' Makro am 19.06.02 von Michael aufgezeichnet
'
' ActiveWindow.SmallScroll Down:=9
Range("A14:X24").Select
Selection.PrintOut Copies:=1, Collate:=True
ActiveWindow.SmallScroll Down:=-12
Range("A3").Select
End Sub
Sub Vergleich_ausblenden()
'
' Vergleich_ausblenden Makro
' Makro am 19.06.02 von Michael aufgezeichnet
'
'
ActiveSheet.Unprotect ""
ActiveWindow.ScrollColumn = 5
Range("Z3:AD3").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.ScrollColumn = 1
Range("A3").Select
ActiveWindow.SmallScroll Down:=9
Range("H14:X24").Select
With Selection.Font
.Name = "Arial"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
ActiveWindow.SmallScroll Down:=-12
Range("A3").Select
ActiveSheet.Protect ""
End Sub