I read that tutorial, and tried to apply it to the macro, came out with this:
Obviously, it's going to fail... what does testcase need to be declared as(I have a string)? Does it need to be filled with something?Code:Sub Main() Dim strings As String() Dim i As Integer Dim quotes As Char = ChrW(34) Dim testcase As String strings = New String() {"started", "starting", _ "ended", "ending"} Console.WriteLine(" test every string to see if it starts with 'st'") For i = 0 To strings.GetUpperBound(0) Select testcase Case strings(i).EndsWith("ed") MsgBox(quotes & strings(i) & quotes & _ " Ends With " & quotes & "ed" & quotes) Case strings(i).EndsWith("ing") MsgBox(quotes & strings(i) & quotes & _ " Ends With " & quotes & "ing" & quotes) Case Else MsgBox("Does not end with parameters") End Select Next End Sub ' Main
I appreciate the help.... I'm more of a C# guy![]()




Reply With Quote