matthewfreestone
New Member
- Joined
- May 29, 2012
- Messages
- 26
Hi All,
Is there a way to use VBA to paste a value which has been copied (through VBA) into the Filter field. When recording my macro I start by using -
Range("E19").Select
Selection.Copy
However when I paste in VBA it pastes the value that is there currently. For example ...
ActiveSheet.Range("$A$1:$T$11596").AutoFilter Field:=5, Criteria1:= _
"Apples"
The problem that I have is that E19 is a field that will change based on information that is added to this sheet every day. So today it may show Apples, but tomorrow it may show Oranges, though the Macro has recorded to set the filter to Apples again.
Any help would be greatly appriciated.
Thanks,
Matt
Is there a way to use VBA to paste a value which has been copied (through VBA) into the Filter field. When recording my macro I start by using -
Range("E19").Select
Selection.Copy
However when I paste in VBA it pastes the value that is there currently. For example ...
ActiveSheet.Range("$A$1:$T$11596").AutoFilter Field:=5, Criteria1:= _
"Apples"
The problem that I have is that E19 is a field that will change based on information that is added to this sheet every day. So today it may show Apples, but tomorrow it may show Oranges, though the Macro has recorded to set the filter to Apples again.
Any help would be greatly appriciated.
Thanks,
Matt