Okay, I think I see what you are doing now. Try testing for B9's
"visibility" this way...
If Workbooks("Ward").Range("B9").RowHeight 0 Then
Rick
"Atishoo" wrote in message
...
Hi rick thanks for your help sorry I didnt give all info.
what i have is a page that lists the patients on different wards these can
be viewed by each ward by selecting the wards from an autofilter drop down
box on the page.
i have a series of email command buttons that will automatically email the
page to the respective wards. To stop people sending the wrong info to the
wrong ward i want only the respective email button to appear when the ward
is
chosen from the auto filter list, hence if cell b9 (which contains the
name
of ward 1) is visible then command button is visble!!
"Rick Rothstein (MVP - VB)" wrote:
I think you will want to change this line...
If Workbooks("Ward").Range("B9").Visible = True Then
to this instead...
If Target.Address = "$B$9" Then
You didn't post enough information for me to know or not, but could you
use
Data/Validation (setting the Allow option to List) maybe?
Rick
"Atishoo" wrote in message
...
am trying to get a combo box to appear when a specified cell is visble
through selection via a filter list am trying this code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveSheet.CommandButton3
If Workbooks("Ward").Range("B9").Visible = True Then
.Visible = True
.Top = Range("f2").Top
.Left = Range("f2").Left
Else: .Visible = False
End If
End With
End Sub
But excell doesnt like the "if visible = true" I know this works for
envelopevisible but not in this instance!!
any inspiration?