Results 1 to 4 of 4

Thread: get the first 6 value from my string var SCHEDINA

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,926

    get the first 6 value from my string var SCHEDINA

    i just have a possible myvar similar:


    SCHEDINA="5 21 48 74 77 88 32"
    SCHEDINA="5 21 29 74 77 88 32"
    SCHEDINA="42 43 44 45 46 47"
    SCHEDINA="4 6 8 10 12 14"

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,622

    Re: get the first 6 value from my string var SCHEDINA

    Code:
    Dim schedina As String
    Dim values() As String
    schedina = "5 21 48 74 77 88 32"
    values = Split(schedina, " ")
    Debug.Print "First value: " & values(0)
    Debug.Print "Second value: " & values(1)
    Debug.Print "Third value: " & values(2)
    Debug.Print "Fourth value: " & values(3)
    Debug.Print "Fifth value: " & values(4)
    Debug.Print "Sixth value: " & values(5)
    Last edited by SamOscarBrown; Sep 14th, 2025 at 11:50 AM.
    Sam I am (as well as Confused at times).

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,622

    Re: get the first 6 value from my string var SCHEDINA

    Did I lose the capability to use code-tags (from buttons)? I don't see them anywhere

    I switched to MS Edge, and i now have the icons...gotta figure out why the Google Browser no longer shows them for me....

    Cleared Cache and now I have the icons back...whew!
    Last edited by SamOscarBrown; Sep 14th, 2025 at 11:56 AM.
    Sam I am (as well as Confused at times).

  4. #4
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: get the first 6 value from my string var SCHEDINA

    Code:
    Private Sub Form_Load()
        Dim SCHEDINA As String
        Dim arr() As String
    
        SCHEDINA = "5 21 48 74 77 88 32"
    
        arr = Split(SCHEDINA, " ")
        
        'Get the first 6 numbers
        For i = 1 To 6
            Debug.Print arr(i - 1)
        Next
        
    
    End Sub
    
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

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
  •  



Click Here to Expand Forum to Full Width