Hide/Unhide column based on cell value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column ("H") that should be visible when the condition in the input
cell is TRUE, invisible when the value is FALSE. I set a breakpoint in the
function below and it never gets there.

Function HideUnhideH()
Application.Volatile
If Application.Worksheets("Inputs").Range("O7") = "Yes" Then
Application.Worksheets("Est&GiftLedgerPRINT").Range("O7") = True
Range("H16").Select
Selection.EntireColumn.Hidden = False
Else
Application.Worksheets("Est&GiftLedgerPRINT").Range("O7") = False
Range("H16").Select
Selection.EntireColumn.Hidden = True
End If
End Function

The print macro handles this when you go to print. I'm just trying to get
this to happen so the end user can see the changes based on his input before
he goes to print.
 
Hi,

A functiojn returns a value.
Use a sub to perform an action.
You could use the worksheet_change event to call a macro instead.
Regards,

Jean-Yves
 
Back
Top