babaso_tawase
Board Regular
- Joined
- Feb 5, 2017
- Messages
- 70
- Office Version
- 2007
- Platform
- Windows
I have table data like below of range a8:q20 and condition in cell E2 with combobox with dropdown value 1 to 12
Sheet name is linearity and table name is points
I used vba code
Private Sub ComboBox1_Change()
Sheet1.Unprotect Password:="a"
Dim points As Range
With Worksheets("Linearity")
Set points = .Range("E2")
With .Range("a8:q20")
.AutoFilter Field:=1, Criteria1:="<=" & points, Operator:=xlFilterValues, Visibledropdown:=False
End With
End With
Sheet1.Protect Password:="a"
End Sub
but getting error whole running code with option end or debug.
Please help in code.
Sheet name is linearity and table name is points
I used vba code
Private Sub ComboBox1_Change()
Sheet1.Unprotect Password:="a"
Dim points As Range
With Worksheets("Linearity")
Set points = .Range("E2")
With .Range("a8:q20")
.AutoFilter Field:=1, Criteria1:="<=" & points, Operator:=xlFilterValues, Visibledropdown:=False
End With
End With
Sheet1.Protect Password:="a"
End Sub
but getting error whole running code with option end or debug.
Please help in code.
Sr.no | Data1 | Data2 | Data3 | Data4 |
1 | abc | W3 | te | Ty |
2 | ade | At | ||
3 | aa | Atr |