Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You should ALWAYS use Option Explicit. Dim your Cell variable As Range.
wrote in message oups.com... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You should ALWAYS... Yup, sorry you missed the sarcasm. Thanks for the ultra-quick response. Aunt Joy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
dimming text | Excel Discussion (Misc queries) | |||
Public variable defintion (newbie) | Excel Programming | |||
A Whole Lot a Dimming Going On | Excel Programming | |||
Frame as variable (newbie question) | Excel Programming | |||
Dimming Controls | Excel Programming |