Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
filter list combo box move
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
filter list combo box move
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
filter list combo box move
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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
filter list combo box move
still having no joy with this problem I just need to know how to structure an
if, then command based on weather a certain cell is visible on a page or not "Atishoo" wrote: 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? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
filter list combo box move
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to apply filter based on list or combo box?? | Excel Discussion (Misc queries) | |||
Move a single combo box from one cell to another... | Excel Programming | |||
Help please - List/Filter/Combo Box? | Excel Discussion (Misc queries) | |||
Filtered list for Combo Box ListFillRange - Nested Combo Boxes | Excel Programming | |||
Combo box to filter | Excel Programming |