Dahlia
Member
Hye,
I have tried to do this but I still being prompted with object defined error. Supposedly, it loops all visible worksheets only except for the "All" sheet (action button I put here). Here are my codes:-
Can someone help to correct what am doing wrong here, please? Cause I've been cracking my head to try all sorts of tweaks but to no avail. However this works perfectly when running on one by one sheet. But I need to be able to do it for simultaneously from one sheet named "All". Am getting desperate now as I need to demo this tomorrow.
Thank you in advance.
DZ
I have tried to do this but I still being prompted with object defined error. Supposedly, it loops all visible worksheets only except for the "All" sheet (action button I put here). Here are my codes:-
Code:
Sub UpdateCharts()
Dim s As Worksheet
For Each s In ThisWorkbook.Worksheets
If s.Name<>"All" and s.Name.visible=TRUE Then Call RankMe
Next s
End Sub
Code:
Sub CalculateMe()
Dim ERow As Integer
Dim SRow As Integer
Dim OldRow As Integer
Application.ScreenUpdating = False
OldRow = ActiveSheet.Range("D" & Rows.Count).End(xlUp).Row
SRow = ActiveSheet.Range("A2").Value
ERow = ActiveSheet.Range("A3").Value
If SRow = OldRow Then
ActiveSheet.Range("D" & SRow & ":F" & SRow).ClearContents
Else
ActiveSheet.Range("D" & SRow & ":F" & OldRow).ClearContents
End If
ActiveSheet.Range("D" & SRow).FormulaR1C1 = "=IF(RC2<>""-"",RC3+10,"")
Application.ScreenUpdating = True
End Sub
Can someone help to correct what am doing wrong here, please? Cause I've been cracking my head to try all sorts of tweaks but to no avail. However this works perfectly when running on one by one sheet. But I need to be able to do it for simultaneously from one sheet named "All". Am getting desperate now as I need to demo this tomorrow.

Thank you in advance.
DZ