+ Reply to Thread
Results 1 to 4 of 4

automate filter

  1. #1
    Brussels1200
    Guest

    automate filter

    Hello All,
    Sorry for my bad english, i'm french.
    I have found on Debra's Website a nice tutorial which contains a macro to
    automate a filter which is in another sheet.
    It's working perfectly, the problem I have is that instead of using the
    combo box in the same sheet I would like to use the combo box which is
    located in another sheet but in the same workbook.
    I'm not good at VBA scripting, here is the code:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Row = 3 And Target.Column = 3 Then
    'calculate criteria cell in case calculation mode is manual

    Worksheets("euList2").Range("h2").Calculate
    Worksheets("euList2").Range("eutable2") _
    .AdvancedFilter Action:=xlFilterCopy, _
    CriteriaRange:=Sheets("euList2").Range("h1:h2"), _
    CopyToRange:=Range("A6:F6"), Unique:=False
    End If
    End Sub

    how can I change the link to the combo box i'm using if the combo box is in
    Cell H10 in my sheet name "Summary"??

    Thanks a lot

  2. #2
    Jim Rech
    Guest

    Re: automate filter

    I see that you have a macro that does an Advanced Filter every time you
    select cell C3 (I think I'd just run it from a button but to each his own).
    Now what does this have to do with a combo box? I see no code related to a
    combo box. The combo box is from the Forms toolbar or the Control Toolbox
    toolbar?

    --
    Jim
    "Brussels1200" <[email protected]> wrote in message
    news:[email protected]...
    | Hello All,
    | Sorry for my bad english, i'm french.
    | I have found on Debra's Website a nice tutorial which contains a macro to
    | automate a filter which is in another sheet.
    | It's working perfectly, the problem I have is that instead of using the
    | combo box in the same sheet I would like to use the combo box which is
    | located in another sheet but in the same workbook.
    | I'm not good at VBA scripting, here is the code:
    |
    | Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    | If Target.Row = 3 And Target.Column = 3 Then
    | 'calculate criteria cell in case calculation mode is manual
    |
    | Worksheets("euList2").Range("h2").Calculate
    | Worksheets("euList2").Range("eutable2") _
    | .AdvancedFilter Action:=xlFilterCopy, _
    | CriteriaRange:=Sheets("euList2").Range("h1:h2"), _
    | CopyToRange:=Range("A6:F6"), Unique:=False
    | End If
    | End Sub
    |
    | how can I change the link to the combo box i'm using if the combo box is
    in
    | Cell H10 in my sheet name "Summary"??
    |
    | Thanks a lot



  3. #3
    Brussels1200
    Guest

    Re: automate filter

    Hi,

    Sorry i didn't express correctly what it is:
    I have a Validation list in cell C3, when selecting the data, it copie to
    cell H2 in sheet eulist2. which genereates an advanced filter.
    Now I would like to use the combo box still in cell C3 but which is located
    in another sheet but still in the same workbook.

    I tried to link the actual C3 with the one I have in the other sheet but the
    advanced filter work only if I click again on cell C3 otherwise it does not
    refresh the advanced filter.

    "Jim Rech" wrote:

    > I see that you have a macro that does an Advanced Filter every time you
    > select cell C3 (I think I'd just run it from a button but to each his own).
    > Now what does this have to do with a combo box? I see no code related to a
    > combo box. The combo box is from the Forms toolbar or the Control Toolbox
    > toolbar?
    >
    > --
    > Jim
    > "Brussels1200" <[email protected]> wrote in message
    > news:[email protected]...
    > | Hello All,
    > | Sorry for my bad english, i'm french.
    > | I have found on Debra's Website a nice tutorial which contains a macro to
    > | automate a filter which is in another sheet.
    > | It's working perfectly, the problem I have is that instead of using the
    > | combo box in the same sheet I would like to use the combo box which is
    > | located in another sheet but in the same workbook.
    > | I'm not good at VBA scripting, here is the code:
    > |
    > | Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > | If Target.Row = 3 And Target.Column = 3 Then
    > | 'calculate criteria cell in case calculation mode is manual
    > |
    > | Worksheets("euList2").Range("h2").Calculate
    > | Worksheets("euList2").Range("eutable2") _
    > | .AdvancedFilter Action:=xlFilterCopy, _
    > | CriteriaRange:=Sheets("euList2").Range("h1:h2"), _
    > | CopyToRange:=Range("A6:F6"), Unique:=False
    > | End If
    > | End Sub
    > |
    > | how can I change the link to the combo box i'm using if the combo box is
    > in
    > | Cell H10 in my sheet name "Summary"??
    > |
    > | Thanks a lot
    >
    >
    >


  4. #4
    Jim Rech
    Guest

    Re: automate filter

    I regret that I am not able to understand what you want to do. Sorry.

    --
    Jim
    "Brussels1200" <[email protected]> wrote in message
    news:[email protected]...
    | Hi,
    |
    | Sorry i didn't express correctly what it is:
    | I have a Validation list in cell C3, when selecting the data, it copie to
    | cell H2 in sheet eulist2. which genereates an advanced filter.
    | Now I would like to use the combo box still in cell C3 but which is
    located
    | in another sheet but still in the same workbook.
    |
    | I tried to link the actual C3 with the one I have in the other sheet but
    the
    | advanced filter work only if I click again on cell C3 otherwise it does
    not
    | refresh the advanced filter.
    |
    | "Jim Rech" wrote:
    |
    | > I see that you have a macro that does an Advanced Filter every time you
    | > select cell C3 (I think I'd just run it from a button but to each his
    own).
    | > Now what does this have to do with a combo box? I see no code related
    to a
    | > combo box. The combo box is from the Forms toolbar or the Control
    Toolbox
    | > toolbar?
    | >
    | > --
    | > Jim
    | > "Brussels1200" <[email protected]> wrote in message
    | > news:[email protected]...
    | > | Hello All,
    | > | Sorry for my bad english, i'm french.
    | > | I have found on Debra's Website a nice tutorial which contains a macro
    to
    | > | automate a filter which is in another sheet.
    | > | It's working perfectly, the problem I have is that instead of using
    the
    | > | combo box in the same sheet I would like to use the combo box which is
    | > | located in another sheet but in the same workbook.
    | > | I'm not good at VBA scripting, here is the code:
    | > |
    | > | Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    | > | If Target.Row = 3 And Target.Column = 3 Then
    | > | 'calculate criteria cell in case calculation mode is manual
    | > |
    | > | Worksheets("euList2").Range("h2").Calculate
    | > | Worksheets("euList2").Range("eutable2") _
    | > | .AdvancedFilter Action:=xlFilterCopy, _
    | > | CriteriaRange:=Sheets("euList2").Range("h1:h2"), _
    | > | CopyToRange:=Range("A6:F6"), Unique:=False
    | > | End If
    | > | End Sub
    | > |
    | > | how can I change the link to the combo box i'm using if the combo box
    is
    | > in
    | > | Cell H10 in my sheet name "Summary"??
    | > |
    | > | Thanks a lot
    | >
    | >
    | >



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1