Thread: macro help
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
thaerr thaerr is offline
external usenet poster
 
Posts: 2
Default macro help

I'm afraid that I am in a little over my head here. I appreciate the help. If
I copy and paste this macro as is into a macro that I create, it doesn't
work. Do I need to replace (ByVal Target As Range) with data?

Please be patient with me. I'm taking baby steps here, lol.

"Mike" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Columns("C:C").EntireColumn.Hidden = True Then
Exit Sub
Else
If Range("C1").Value = "hide" Then
Columns("C:C").Select
Selection.EntireColumn.Hidden = True
End If
End If
End Sub

"thaerr" wrote:

I know that I can create a macro that will monitor a specific cell, and once
that cell equals the contents of another cell, an event will occur. The event
that I would like to occur would be for the row to be hidden. I've worked
just a very little bit with macros, so I'm looking for help in creating this
macro.