Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21127

[RESOLVED] Need Help (Populate Date range to Listbox)

$
0
0
How to populate Date range to Listbox?

dFR = DtPicker1.Value ' From
dTo = DtPicker2.Value ' To

For example : (From : 02/27/2014) (To : 03/03/2014)



The output must be like this :

27 - Thu
28 - Fri
1 - Sat
2 - Sun
3 - Mon

I need to display this on ListBox

I Have Basic Codes but it doesn't work
Code:

Dim i As Long
Dim lrow As Long
Dim dFR As String
Dim dTO As String

    dFR = Format(dtRange(0).Value, "mm/dd/yyyy")
    dTO = Format(dtRange(1).Value, "mm/dd/yyyy")
   
    For i = dFR To dTO
       
        list1.Additem format(i,"d - DDD")
       
    Next i

any help?

Viewing all articles
Browse latest Browse all 21127

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>