Private Sub Worksheet_Activate + Application.Run ?
05.02.2010 09:48:04
Angelo Wi
Guten Tag
ich möchte dass in diesem sub über Application.Run "Kontrolle" ein weiteres Makro sofort gestartet wird
damit das gesamte Rechenwerk überprüft und kontrolliert werden kann
bei mir funktioniert das so nicht
Herzlichen Dank für die Lösung
mfG Angelo
Private Sub Worksheet_Activate()
Dim ws As Worksheet, intI As Integer, lngLZ As Long
Cells.Clear 'Zuerst alles löschen
For Each ws In Worksheets
If ws.Name <> ActiveSheet.Name Then
intI = intI + 1
If intI = 1 Then
ws.[A1].CurrentRegion.Copy
ActiveSheet.[A1].PasteSpecial xlValues
Else
lngLZ = Cells.Find("*", SearchDirection:=xlPrevious).Row
ws.[A1].CurrentRegion.Offset(2).Copy
ActiveSheet.Cells(lngLZ + 1, 1).PasteSpecial xlValues
End If
End If
Next
Application.CutCopyMode = False
[A1].Select
Application.Run "Kontrolle"
End Sub