Interaction between worksheets

G

Guest

The Combo is in the Summary Worksheet,
and the other sheets:DC,Time,Sheet3
should react when user clicks, clearly there is something
missing in my code, thanks in advance


Public Sub ComboBox1_Click()
Call filt
End Sub




Public Sub filt()

If Worksheets("Summary").ComboBox1.Value = "Qual" Then
Worksheets("DC").Range("Letters").ShowAllData
Worksheets("DC").Range("Letters").AutoFilter Field:=2, Criteria1:="Qual"
Range("a3").EntireRow.Hidden = True
Worksheets("Time").Range("A1:B50").Clear
Worksheets("Sheet3").Range("a1:b17").Copy
Destination:=Worksheets("Time").Range("a2")
Else
If Worksheets("Summary").ComboBox1.Value = "Quant" Then
Worksheets("DC").Range("Letters").ShowAllData
Worksheets("DC").Range("Letters").AutoFilter Field:=1, Criteria1:="Quant"
Range("a3").EntireRow.Hidden = True
Else
If Worksheets("Summary").ComboBox1.Value = "Both" Then
Worksheets("DC").Range("Letters").ShowAllData
Range("a3").EntireRow.Hidden = True
Worksheets("Time").Range("A1:B50").Clear
Worksheets("Sheet3").Range("a1:b31").Copy
Destination:=Worksheets("Time").Range("a2")
End If
End If
End If
End Sub
 
P

Paul Robinson

Hi Teresa
What is the code supposed to do? What does it do?? If an error is
generated, what is it and which line does it occur on??? Since you
have not said what your
If you can provide that info, then people have some chance of dealing
with your "clearly" bit!
regards
Paul
By the way, have you tried fully qualifying your range references?
What sheet is Range("a3") on for example?
 

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