Wrox Programmer Forums
|
Beginning VB 6 For 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
 
Old September 7th, 2004, 04:31 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default FileList Box

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
 
Old September 8th, 2004, 04:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Marco
 
Old September 28th, 2004, 09:57 AM
Authorized User
 
Join Date: Sep 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Lalit_Pratihari
Default

Hi,

You can take the help of FileSystemObject.
In that you could be able to truncate the file extension.

Thanks,

Lalit
Life Means More...;)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
select box/List box alphabetic sort sasidhar79 Javascript How-To 3 November 10th, 2004 03:04 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM
FileList and DriveList Boxes in VBA jake Excel VBA 2 December 28th, 2003 07:10 PM
Search using drop down list box and a text box tcasp Classic ASP Basics 1 July 31st, 2003 02:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.