by "Mike Middleton" <mike@[EMAIL PROTECTED]
>
May 5, 2008 at 11:36 PM
c1802362 or Art -
What is the text string test_string? Where is it defined and how?
For example, in a standard module, this works:
Sub test()
test_string = "first header"
Select Case test_string
Case Is = "first header"
MsgBox "First Header"
Case Is = "second header"
MsgBox "Second Header"
End Select
End Sub
- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel
"c1802362" <utay1@[EMAIL PROTECTED]
> wrote in message
news:f11cc592-73a9-4144-a083-ee07895db527@[EMAIL PROTECTED]
>I am trying to use a text string in a select case statement in VBA. To
> wit:
>
>
> Select Case test_string
>
> Case Is = "first header"
> statement 1
>
> Case Is = "second header"
> statement 2
>
> etc
>
> End Select
>
> I've been trying (without luck) to get VBA to recognize the text
> string.
>
> Any suggestions?
>
> Art