automate filter

G

Guest

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
 
J

Jim Rech

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
| 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
 
G

Guest

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.
 
J

Jim Rech

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

--
Jim
| 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
| > | > | 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
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top