Hi,
I have created the below code and when I execute the code it work's fine and gives me the result I want. The problem I am having is that once this is run it is adding autofilter on the another worksheet which I don't want.
What am I doing wrong? Can you help me please.
Sub ViewAllWeekly()
On Error GoTo HandleError
Dim WeekNumber As String
With Sheets("Weekly Sheet")
WeekNumber = InputBox("Please Enter Week Number")
.Range("C4") = WeekNumber
ActiveSheet.Range("$A$4:$K$467").AutoFilter Field:=1
Sheets("Weekly Sheet").Select
HandleError:
End With
End Sub
Thanks
Yogin
I have created the below code and when I execute the code it work's fine and gives me the result I want. The problem I am having is that once this is run it is adding autofilter on the another worksheet which I don't want.
What am I doing wrong? Can you help me please.
Sub ViewAllWeekly()
On Error GoTo HandleError
Dim WeekNumber As String
With Sheets("Weekly Sheet")
WeekNumber = InputBox("Please Enter Week Number")
.Range("C4") = WeekNumber
ActiveSheet.Range("$A$4:$K$467").AutoFilter Field:=1
Sheets("Weekly Sheet").Select
HandleError:
End With
End Sub
Thanks
Yogin