Beginning VB 6For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
this being my first question and being a VB virgin, its probably a very easy one for you guys to answer.
My FileListBox list shows the file extensions as well. Is there anyway to omit these, leaving just the file name?
thanks
as far as I know it cannot be done (unless subclassing)
but it is very easy to build your own file list using a standard listbox and the Dir function.
dim ss as string
ss = Dir(myFolderPath & "\*") '' filter here the files you want, like "\*.txt"
do
if len(ss) = 0 then exit do '' no more files
'' check if the file has an extension
ss = left(ss, len(ss)-4)
listbox.add ss
ss = Dir '' next file
loop