ListItems(i).ForeColor = vbBlue 'List with Path and Files ListItems.Add, , myFilesList,, "OtherIco8" End Select ListItems.Add, , myFilesList,, "DocIco5" Case Else ListItems.Add, , myFilesList,, "XpsIco7" Case ".DOC", ".DOCX" ListItems.Add, , myFilesList,, "TxtIco4" Case ".XPS" ListItems.Add, , myFilesList,, "PdfIco2" Case ".TXT" ListItems.Add, , myFilesList,, "XlsIco6" Case ".PDF" ListItems.Add, , myFilesList,, "ImgIco1" Case ".XLS", ".XLSX" ListItems.Add, , myFilesList,, "ImgIco1" Case ".PNG" MyFLExten = UCase( Mid(myFilesList, InStrRev(myFilesList, "."), Len(myFilesList)))Ĭase ".JPG" ', ,, 'Loop wntil Files' list will not Null or Empty While myFilesList > vbNullString Dim MyFLExten As String 'Following formula is used for Extract "Extension" from Files MyFilesList = Dir( "C:\SKOTechLearn_Files\*.*") 'First you have to set listview smallicon with ImageList Set MyLstView.SmallIcons = MyImageListĭim myFilesList As String 'Use Dir for Collection files' List Process(1): In this process we use Select Case Statement for showing files with path and icons in Listview.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |