bearcub
Well-known Member
- Joined
- May 18, 2005
- Messages
- 734
- Office Version
- 365
- 2013
- 2010
- 2007
- Platform
- Windows
I have a procedure where I am making a copy of another sheet and one from this copy I create separate sheets based upon the text that is contained in a particular column.
To specifiy which column to filter on I'm having the user type "AL1" in an input box and the value in the input box is used to create a filter.
Here is the snippet of code where I think this comes into play:
The Set objRange is where I type in "AL1".
Then, the FilterCol and FilterRow variables create a filter by Column and by Row. In other words, takes AL1 from the input box and converts it to range that can be used for filtering.
How would I hard code "AL1" into the code so that I don't have to ask the user to enter it in the input box?
Thank you for your help
Michael
To specifiy which column to filter on I'm having the user type "AL1" in an input box and the value in the input box is used to create a filter.
Here is the snippet of code where I think this comes into play:
Code:
Set objRange = Application.InputBox("Enter AL1 To Filter by SCC", "Range Input", , , , , , 8)
On Error GoTo 0
If objRange Is Nothing Then
Exit Sub
ElseIf objRange.Columns.Count > 1 Then
GoTo top
End If
FilterCol = objRange.Column
FilterRow = objRange.Row
The Set objRange is where I type in "AL1".
Then, the FilterCol and FilterRow variables create a filter by Column and by Row. In other words, takes AL1 from the input box and converts it to range that can be used for filtering.
How would I hard code "AL1" into the code so that I don't have to ask the user to enter it in the input box?
Thank you for your help
Michael