Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have three worksheets named May-03, Jun-03 and Jul-03 in a workbook. I have
the following code in a macro: Dim Wksht As Worksheet Wksht.Activate MsgBox Left(WkSht.Name, 3) Select Case Left(WkSht.Name, 3) Case "May" RowRef = "467" Case "Jun" RowRef = "468" Case "Jul" RowRef = "469" Case Else MsgBox .................. End Select No matter which worksheet I run this on, I get the correct name of the worksheet in MsgBox Left(WkSht.Name, 3) but then the Select Case always go to the Case Else statement. If the Macro gets it right in the Magbox function, why doesn't it get the Case statement? Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select case in vba | Excel Discussion (Misc queries) | |||
select case | Excel Discussion (Misc queries) | |||
Select Case ignored | Excel Worksheet Functions | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
Select Case | Excel Discussion (Misc queries) |