Results 1 to 11 of 11

Thread: Case Select vs. Switch

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    snb
    Guest
    It's also dependent on how you structure your data:

    Sub M_snb()
       c00 = "Nadal"
       sn = Split("Phelps_Swimming Nadal_Tennis Messi_Football")
       c01 = "Phelps Swimming Nadal Tennis Messi Football"
    
       MsgBox Split(Filter(sn, c00)(0), "_")(1)
       MsgBox Split(Split(c01, c00)(1))(1)
       
       With CreateObject("scripting.dictionary")
            sp = Split(c01)
            For j = 0 To UBound(sp) - 1 Step 2
               .Item(sp(j)) = sp(j + 1)
            Next
       
            MsgBox .Item(c00)
       End With
    End Sub

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,446
    Location
    Quote Originally Posted by snb View Post
    It's also dependent on how you structure your data:
    What is?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •