LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default select case question


in A1 i have the text, "this is a test"

i try to use this select case statement

var1 = "test"

sStr = Range("A1").Value
Select Case sStr
Case sStr Like "*" & var1 & "*"
'do something here


the first case statement is skipped but if i break and hover the mouse over it,
says it equals true. if i go to the immediate window and type
?sStr Like "*" & var1 & "*"
TRUE

it returns true. so why does it skip to the next select case statement? if it's
the only select case statement, it exits the select case without doing anything.
--


Gary



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Select Case question Otto Moehrbach Excel Programming 5 February 28th 07 09:32 PM
select case question Gary Keramidas Excel Programming 3 April 6th 06 12:40 AM
VBA select case question Jeff Excel Discussion (Misc queries) 2 January 27th 06 03:03 AM
Select Case Question Craig Excel Programming 6 January 6th 06 09:37 AM


All times are GMT +1. The time now is 09:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"