Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using another delimter than comma

Status
Not open for further replies.

kalle82

Technical User
Apr 2, 2009
163
SE
Hi!

Just as the subject tells you. How do I use another delimiter than comma, I want to use the pipe "|".

Code:
Input #1, date1, loggen, date2
'address2,
        lngItemIndex = lngItemIndex + 1
        Set lvItems = UserForm1.Controls(dynamicbox).ListItems.Add
        lvItems.Text = date1
        lvItems.SubItems(1) = loggen
        lvItems.SubItems(2) = date2
              
        datumskillnad = DateDiff("d", date2, Now())
        'MsgBox (datumskillnad)
        
        Select Case datumskillnad

                Case Is = -1

                lvItems.ForeColor = RGB(255, 165, 0)
                lvItems.ListSubItems.Item(1).ForeColor = RGB(255, 165, 0)
                lvItems.ListSubItems.Item(2).ForeColor = RGB(255, 165, 0)

                Case Is = -2

                lvItems.ForeColor = RGB(255, 165, 0)
                lvItems.ListSubItems.Item(1).ForeColor = RGB(255, 165, 0)
                lvItems.ListSubItems.Item(2).ForeColor = RGB(255, 165, 0)
                Case Is = -3

                lvItems.ForeColor = RGB(255, 165, 0)
                lvItems.ListSubItems.Item(1).ForeColor = RGB(255, 165, 0)
                lvItems.ListSubItems.Item(2).ForeColor = RGB(255, 165, 0)

                Case Is >= 0

                lvItems.ForeColor = RGB(255, 0, 0)
                lvItems.ListSubItems.Item(1).ForeColor = RGB(255, 0, 0)
                lvItems.ListSubItems.Item(2).ForeColor = RGB(255, 0, 0)
                
                Case Is <= -4

                lvItems.ForeColor = RGB(100, 200, 50)
                lvItems.ListSubItems.Item(1).ForeColor = RGB(100, 200, 50)
                lvItems.ListSubItems.Item(2).ForeColor = RGB(100, 200, 50)
                
                Case Else


                End Select
        
              
        
        
    Loop
    
Close #1
 
What problem are you having?
Build:
Code:
 strVar = a & "|" & b

seperate check out the split function.

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top