A
auntjoy
Got my hands on a function, and I'm having a bit of difficulty with
it.
Public Function Sum_Visible_Cells(Cells_To_Sum As Object)
Application.Volatile
For Each Cell In Cells_To_Sum
If Cell.Rows.Hidden = False Then
If Cell.Columns.Hidden = False Then
Total = Total + Cell.Value
End If
End If
Next
Sum_Visible_Cells = Total
End Function
Compiler errors on "For Each Cell In", "Cell" comes up as an undefined
variable. So, I took out the "Option Explicit" at the top of the
module. FIXED THAT!!!! hahahahah.
Anyway, my question is: What should "Cell" be dimmed as?
Thanks so much for your help!
Aunt Joy
it.
Public Function Sum_Visible_Cells(Cells_To_Sum As Object)
Application.Volatile
For Each Cell In Cells_To_Sum
If Cell.Rows.Hidden = False Then
If Cell.Columns.Hidden = False Then
Total = Total + Cell.Value
End If
End If
Next
Sum_Visible_Cells = Total
End Function
Compiler errors on "For Each Cell In", "Cell" comes up as an undefined
variable. So, I took out the "Option Explicit" at the top of the
module. FIXED THAT!!!! hahahahah.
Anyway, my question is: What should "Cell" be dimmed as?
Thanks so much for your help!
Aunt Joy