Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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.. -- broro18 ----------------------------------------------------------------------- broro183's Profile: http://www.excelforum.com/member.php...fo&userid=3006 View this thread: http://www.excelforum.com/showthread.php?threadid=51909 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I count only lower case "x" and exclude upper case "X" | Excel Worksheet Functions | |||
Why Error Message "End Select without Select Case"? | Excel Programming | |||
SELECT CASE "Jan-03" confusion | Excel Programming | |||
Fix Code: Select Case and "Contains" selection | Excel Programming | |||
Problem with Select Case construct? | Excel Programming |