View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ExcelMonkey ExcelMonkey is offline
external usenet poster
 
Posts: 553
Default Run Time Error 13 Type Mismatch

I am wrapping a function around a public variable called Cell. When I run
the macro, the code breaks with a Run Time Error 13. However when I hit F8
it allows me to step through it. I can't figure out why its breaking in the
first place. Do I have to further dimenion it within the function?


Public Cell As Range
Sub Main()
CellIsHidden(Cell)
End Sub


Public Function CellIsHidden()
If Cell.Parent.Protect = True Then
If Cell.FormulaHidden = True Then
CellIsHidden = True
End If
End If
End Function


Thanks