Thread: Macro Help
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Macro Help

I had forgotten about I if. Minor tweaks
Private Sub Worksheet_Change(ByVal Target As Range)
'Application.EnableEvents = False' not necessary
If Not Application.Intersect(Target, Range("E2")) Is Nothing Then
Rows(10).Hidden = IIf(UCase(Range("E2")) = "YES", True, False)'spelling
End If
'Application.EnableEvents = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jacob Skaria" wrote in message
...
Right click the sheet tabView code and paste the below code and try

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("E2")) Is Nothing Then
Rows(10).Hidden = IIf(Range("E2") = "Yes", True, False)
End If
Application.EnableEvents = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jeremy" wrote:

I have it working but you have to play the macro. How would you get the
macro to auto play?



"Jacob Skaria" wrote:

Sub Mac()
Rows(10).Hidden = IIf(Range("E2") = "Yes", True, False)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jeremy" wrote:

I have recorded a macro to hid row 10. How would I automate this
macro to
hide if E2 has yes and unhide if it has no?


Thank you

Jeremy