Hi,
I'm trying to hide columns based on whether formulas in certain cells evaluate to zero. All of the cells are contained in named ranges that are all in the same row. I'm attempting to use the Union function to join those discontinuous named ranges into a single range, that I can then use to evaluate the individual cells with formulas, determine if they evaluate to Zero and if they do; then hide the entire column.
The error is
Run-time error "1004"
Application-defined or Object-defined error

Running Win XP & xl 2002

Thanks in advance for any help

Here is the code

Private Sub HideColumns()

Dim c As Range
Dim d As Range

Set d = Application.Union(Range("DFPlates_Array"), Range("RdWdPlates_Array") _
, Range("TotalStudArray"))
For Each c In d
If c.Value = 0 Then
c.EntireColumn.Hidden = True
Else
c.EntireColumn.Hidden = False
End If
Next c

End Sub