B
broro183
Hi all,
As part of a larger macro which performs custom autofiltering using
shortcut key I am trying to use an "Or" operator in one of my "case is
lines.
Currently I have the following code which is used after identifyin
that the left character of the "InitialFilterValue" (dimmed as a strin
& sourced from an input box) is "<".
Select Case Left(InitialFilterValue, 2)
Case Is = "<>"
GoTo MakeStringPrefixDoubleLeft
Case Is = "<="
GoTo MakeStringPrefixDoubleLeft
Case Else
GoTo MakeStringPrefixSingleLeft
End Select
In the interests of optimising my code & because the first two case
have the same action, is it possible to combine the first two case
using something like...
" Case is = "<>" Or "<=" "?
FYI, when I try the above line I get the error message "Run time error
13 type mismatch". I've dimmed InitialFilterValue as a string becaus
there will be other situations when I am attempting to filter tex
strings.
Also in the interests of optimising my complete code is anyon
interested in reviewing it & making suggestions?
btw, it is not as complete as Ron DeBruin's "easy filter
http://www.rondebruin.nl/easyfilter.htm
but it is quick & effective (apart from dates, which can stil
sometimes cause issues) wrt what I need - a keyboard activated custo
filter.
I'll try any suggestions when I get a chance in the morning,
Thanks in advance,
Rob Brockett
NZ
Always learning & the best way to learn is to experience..
As part of a larger macro which performs custom autofiltering using
shortcut key I am trying to use an "Or" operator in one of my "case is
lines.
Currently I have the following code which is used after identifyin
that the left character of the "InitialFilterValue" (dimmed as a strin
& sourced from an input box) is "<".
Select Case Left(InitialFilterValue, 2)
Case Is = "<>"
GoTo MakeStringPrefixDoubleLeft
Case Is = "<="
GoTo MakeStringPrefixDoubleLeft
Case Else
GoTo MakeStringPrefixSingleLeft
End Select
In the interests of optimising my code & because the first two case
have the same action, is it possible to combine the first two case
using something like...
" Case is = "<>" Or "<=" "?
FYI, when I try the above line I get the error message "Run time error
13 type mismatch". I've dimmed InitialFilterValue as a string becaus
there will be other situations when I am attempting to filter tex
strings.
Also in the interests of optimising my complete code is anyon
interested in reviewing it & making suggestions?
btw, it is not as complete as Ron DeBruin's "easy filter
http://www.rondebruin.nl/easyfilter.htm
but it is quick & effective (apart from dates, which can stil
sometimes cause issues) wrt what I need - a keyboard activated custo
filter.
I'll try any suggestions when I get a chance in the morning,
Thanks in advance,
Rob Brockett
NZ
Always learning & the best way to learn is to experience..