Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
All I’m wanting to do is hide columns X:Y if d7 = ""<o></o>
If it’s not = "" I would like the columns to be visible<o></o>
<o></o>
Here’s the code I have created;<o></o>
<o></o>
Sheet6.Select<o></o>
If Range("D7") = "" Then<o></o>
Columns("X:Y").Select<o></o>
Selection.EntireColumn.Hidden = True<o></o>
If Range("D7") <> "" Then<o></o>
Columns("X:Y").Select<o></o>
Selection.EntireColumn.Hidden = False<o></o>
End If<o></o>
End If<o></o>
<o></o>
End Sub<o></o>
<o></o>
It hides the columns ok but doesn’t unhide them when necessary.<o></o>
<o></o>
Can anyone help?<o></o>
<o></o>
Thanks<o></o>
<o></o>
All I’m wanting to do is hide columns X:Y if d7 = ""<o></o>
If it’s not = "" I would like the columns to be visible<o></o>
<o></o>
Here’s the code I have created;<o></o>
<o></o>
Sheet6.Select<o></o>
If Range("D7") = "" Then<o></o>
Columns("X:Y").Select<o></o>
Selection.EntireColumn.Hidden = True<o></o>
If Range("D7") <> "" Then<o></o>
Columns("X:Y").Select<o></o>
Selection.EntireColumn.Hidden = False<o></o>
End If<o></o>
End If<o></o>
<o></o>
End Sub<o></o>
<o></o>
It hides the columns ok but doesn’t unhide them when necessary.<o></o>
<o></o>
Can anyone help?<o></o>
<o></o>
Thanks<o></o>