I have a macro that runs when a cell data changes and it works fine, however I want to have a button on the first sheet that will run this macro on every single page, i dont want to rewrite the whole crazy long macro from multiple pages into a button module, so i was thinking its easier if i just make excel think the data changed so it would run the macro to update it.
Here is what I have, but it seems to not work for whatever reason:
Sub FullUpdateTest()
'Clear all traffic lights
Sheets("Geräte, Einrichtungen..").Activate
Range("G5:M300").Select
Selection.ClearContents
Sheets("Geräte, Einrichtungen..").Activate
Range("E55:E300").Select
Selection.ClearContents
Sheets("Kalkulat. ALV").Activate
Range("E4:E300").Select
Selection.ClearContents
Sheets("Dokumente").Activate
Range("E4:E300").Select
Selection.ClearContents
Sheets("Instandhaltungskosten").Activate
Range("E4:E300").Select
Selection.ClearContents
StartRow = 2
EndRow = 300
For RowCnt = StartRow To EndRow
SheetToActivate = "Geräte, Einrichtungen.."
Sheets(SheetToActivate).Activate
TempInfo = Cells(RowCnt, 2)
Range(Cells(RowCnt, "2")).Select
Selection.ClearConents
Cells(RowCnt, 2) = "74893740141"
Cells(RowCnt, 2) = TempInfo
SheetToActivate = "Kalkulat. ALV"
Sheets(SheetToActivate).Activate
TempInfo = Cells(RowCnt, 2)
Range(Cells(RowCnt, "2")).Select
Selection.ClearConents
Cells(RowCnt, 2) = "74893740141"
Cells(RowCnt, 2) = TempInfo
SheetToActivate = "Dokumente"
Sheets(SheetToActivate).Activate
TempInfo = Cells(RowCnt, 2)
Range(Cells(RowCnt, "2")).Select
Selection.ClearConents
Cells(RowCnt, 2) = "74893740141"
Cells(RowCnt, 2) = TempInfo
SheetToActivate = "Instandhaltungskosten"
Sheets(SheetToActivate).Activate
TempInfo = Cells(RowCnt, 2)
Range(Cells(RowCnt, "2")).Select
Selection.ClearConents
Cells(RowCnt, 2) = "74893740141"
Cells(RowCnt, 2) = TempInfo
Next RowCnt
End Sub
Bookmarks