View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ivory_kitten ivory_kitten is offline
external usenet poster
 
Posts: 40
Default Hide/Show a row based on data entry in another row

I must be doing something wrong! It works once or twice then nothing
happens! I'm copying it exactly.

"Norman Jones" wrote:

Hi Ivory Kitten,

I get: Compile Error: Ambiguous name detected: Worksheet_Change!


But I think that's because I have another function which changes some text
fields to uppercase. How do I use both?


It is only possible to have one Worksheet_Change procedure.

Try replacing your present two procedures with;

'=============
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range

Set rng = Me.Range("B4")

If Not Intersect(rng, Target) Is Nothing Then
Rows(19).EntireRow.Hidden = IsEmpty(rng.Value)
End If

If Not Application.Intersect(Range("b1,b2,b5"), _
Target) Is Nothing Then
Target.Formula = StrConv(Target.Formula, vbUpperCase)
End If

End Sub
'<<=============


---
Regards,
Norman