Board index » Visual Studio » Problem populating a combobox if cases differ
|
highflyer95
|
Problem populating a combobox if cases differ
Visual Studio200
I am trying to populate a combobox with all files in a certain folder with a .png extension. Hers what i have... Dim strFileName As String 620 frmMain.cboEffect.AddItem "None" 630 strFileName = Dir$(strShortPath & "\*.png") 640 strFileName = Replace(strFileName, ".png", "") 650 strFileName = StrConv(strFileName, vbProperCase) 660 While strFileName <>"" 670 frmMain.cboEffect.AddItem strFileName 680 strFileName = Replace(Dir$, ".png", "") 690 strFileName = StrConv(strFileName, vbProperCase) 700 Wend I want to remove the .png extension in the combobox. The problem is, if the .png is .PNG, it is not working. How do i correct this? -- Thanks. - |
