Help With File List , Dir List And Drive List Boxes..
How do i link my drive list , file list and dir list boxes to gether , so that when i for exaple set the drive list to c: , the dir list will then give all dir in there, and file list will show me files from the directory, right now the default file list is set to my vb file list and i cant change it...
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- Drive List And Directory List Boxes
- Drive List And Directory List Boxes
- Opening A Word Document Using Drive/Directory/File List Boxes
- Using Drop- Down Drive List Boxes
- LIST BOX HELL. Please Save, Remove Items, Many List Boxes...one Last Name
- Dir List And Drive List Problems
- Drive, Dir, File List...
- Drive,Directory,File List Box
- How To Get List Of Files In File List Box Depending On Date
- Trouble Aligning Drive List Box, Dir, File
- Getting A Combo Box List And Putting It In A List Box List On Another Form
- 2 List Boxes, 1 INI File
- File/Dir List Boxes
- File List Boxes?
- File List Boxes
- File List Boxes
- Network Drive Files Not Being Displayed In File List Box.
- Menu List To List The File Name Which Have Opened.
- Drive List Box / Dir List Box
- Multi Selection In File List Boxes
- Filtering A Text File To List Boxes
- OLEDragDrop W/ Directory And File List Boxes?
- Reading Data From A Single File To Two List Boxes
- Dir List Box And File List Box Help Needed
- Dir List Box And File List Box Help Needed
- Activex Controls For List Box, List View & Combo Box (for Storing Arabic Language)
- Select Folder Dialog. List All Folders And Subfolder In List View
- Finding List Item As U Typed In Combo Box(Dropdown List Style).
- Create A Property Window Dropdown List AKA Listbox List/ItemData
- Create List Of Files From Folder But Allow Double Click On List Item To Run Bat
- HighLight List Box Selected List Item With User Defined Color
- Excel - Dropdown Showing List 2 Dependant On What Was Chosen In List 1
- If Item Selected In Combo Box Then Clear List Box Then Add New Items In The List Box
- Editing List Items And ListSubItems In List View Control
- What Is The Limits On COmbo Box, List Box And LIst View And How Do You Handle Situations W
- Changing To A List View Instead Of A List Box To Overcome 32768 Limits
- How To Change Back Color Of List Item In List View
- Drive List
- Drive List Box
- How Do I Get The List Of Drive Name?
- UNC In A Drive List Box?
- Drive List Box
- Drive List Box.
- Drive List Help
- Help With Drive List
- Drive List Box
- Drive List Box
- Drive List Box??
- Drive List Box
Drive List And Directory List Boxes
I have one drive list box and one directory list box in my program.
When I run my program I can see all Local and Mapped network drives.
But I need to add the Network Neighborhood in the Drive list box.
I need to be able to see all servers and drives on the network. Can anyone tell me how to do this? Thanks!
Drive List And Directory List Boxes
I have one drive list box and one directory list box in my program.
When I run my program I can see all Local and Mapped network drives.
But I need to add the Network Neighborhood in the Drive list box.
I need to be able to see all servers and drives on the network. Can anyone tell me how to do this? Thanks!
Opening A Word Document Using Drive/Directory/File List Boxes
This probably has a really obvious/easy answer, but I'm going to ask it anyway, as I have no idea how to make it work!
I have a form with a drive list box, a directory list box and a file list box and a file open button. What I am trying to do is to use those boxes to enable the user to look for their file and open that file using Microsoft Word.
However, I have looked all over the Help file, tutorials and such, and all I can find is how to use OLE to have the files displayed still in the Visual Basic interface I'm trying to avoid doing this, as I just want it to open the file in Word, if that is even possible.
So if someone could pleeeeeeeease please tell me coding to do that I would be very grateful
Also, the drive, directory and file list boxes on my form don't seem to like working together so changing them while the form is running doesn't impact any others. Argh
Anyone that could help me I would love forever
Thankyou.
Using Drop- Down Drive List Boxes
I need to be able to know how to check if a drive is ready when selected in a Drive list box and send an error message so that it doesn't come up with a runtime error like it has for me. I accidentally selected the CD drive (which happened to have no CD in it at the time) and it came up with a runtime error. I need to know how to check if a drive is ready and either take it out of the drive list box in the Form_Load event or have it bring up an error message when it is selected. Anyone who has even has the faintest idea about these things, HELP! I don't care if you get it wrong, I just need people to answer and give me ideas of what to ask and look for. Thanks is advance for your help.
Now, don't get me wrong, 'cause baseball's a great sport.
It teaches little children simple eye-hand coordination with little effort or exhaustion.
-byufan
LIST BOX HELL. Please Save, Remove Items, Many List Boxes...one Last Name
ok, so the code so far, or as much as you need to see, is
****************************
***************************
***************************
***************************
***************************
Sub LoadCal()
Dim gdtDate As Date
Dim i As Integer
Dim x As Integer
Dim startDay As Integer
Dim giMaxDays As Integer
' clear list boxes before filling again
For i = 0 To 41
List1(i).Clear
Next
' * * * * * * * * * * * * * * * * * * * * * *
' * * * * * ADD DAY NUMBERS * * * * *
'label at top of form
Label1.Caption = MonthName(giMonth) & " " & giYear
'this is the current date
gdtDate = CDate(giMonth & "/01/" & giYear)
'minus one so the first line is never completely empty
startDay = Weekday(gdtDate) - 1
'the number of days in this month
giMaxDays = Day(DateAdd("m", 1, gdtDate) - 1)
'populates list boxes with days
x = 1
i = startDay
While i < (giMaxDays + startDay)
List1(i).AddItem (x)
x = x + 1
i = i + 1
Wend
' * * * * * * * * * * * * * * * * * * * * * *
' * * * * * ADD NAMES TO DAYS * * * * *
' !!!!!!!!!!!!!!!!!check to see that list is not empty !!!!!!!!!!!
If lstAgentList.ListCount = 0 Then GoTo done
'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
'agent list counter, "at which item" index
x = -1
'populate list boxes from the first day of the month with numbers
i = startDay
'counter for number of days until sunday
a = startDay - 1
'from the first day to the last day
While i < (giMaxDays + startDay)
If a < 6 Then
'a maximum of 3 names per day
While (List1(i).ListCount) < 4
' if there are no more items in the items list ('x' is greater than counter)
If x < (lstAgentList.ListCount - 1) Then
x = x + 1
' otherwise set it back to 0 (zero)
Else
x = 0
End If
'add the next name from the established agent list
List1(i).AddItem (lstAgentList.List(x))
Wend
a = a + 1
Else
'a maximum of 3 names per day
While (List1(i).ListCount) < 4
'add the next name from the established agent list
List1(i).AddItem (lstAgentList.List(x))
'here we do not increment name for it is a sunday
Wend
'reset 7 days until sunday counter
a = 0
End If
'increment day count
i = i + 1
Wend
done:
' end
End Sub
***************************
***************************
***************************
***************************
now see the shaddy thing with this is...well, it's a calendar month see, and every day is a list box....first item, the date, 1st, 2nd, 3rd, 4th, and so on...each list box can hold that first item, the date, plus 3 names.
if someone double clicks on one of those names (which are populated through other methods...not important) i want that name to be deleted...now where i am out of ideas is: how do i delete one item from one list when my list (List1) is an array of about 41 list boxes all named List1 (x) see....
also if I wanted that name which was double click to delete itself through the entire month, then ....well...the rest is my own trouble...but so far i can't seem to be able to delete.
grrr.
...
thanks in advance,
-munchkin
Dir List And Drive List Problems
im trying to make a program that will view files on a mobile device in a cradle, the device is set up correctly because i can view all the files and folder on the mobile device (XDAII) in windows explorer and active sync. i have linked a drive list to a dir list (so when the drive changes it updates the files in the dir list, but the drive list doesnt show the mobile device?
Any Suggestions??
Cheers
Pendaz
Drive, Dir, File List...
Im making an app with load & save screens that use drive, dir & file lists to browse. Ive also got a text field that shows the Root, but i need to add "/" in myself. Thats a problem because when its top level there are 2 of them (C://). Is there some way to get that it is the top Level?
Aoeguy
Drive,Directory,File List Box
Can anyone help me with this?
I'm having trouble setting the Directory box to show the file path that i want.
And i do not want it enabled at run time
Trouble Aligning Drive List Box, Dir, File
I keep trying to align my drivelist, fileList and Dirlist boxes..but they wont line up.. i move them into position..and it feels like they wont align up with the grid..and yes align to grid is checked in the options.. i dont understand whats going on..
Getting A Combo Box List And Putting It In A List Box List On Another Form
I am finally writing my first MDI! I'm doing a lot better than I thought I would so far, but now I'm stuck. I need to have a list from a combo box copied into a list box on another form. I want it in the Form_Load() event. Right now I have:
Code:Private Sub Form_Load()
frmpresetedit.deletepreset.List = frmtimer1.cmbpresets.List
frmpresetedit.Show
End Sub
deletepreset is the list box, cmbpresets is my combo box.
It always comes up with a compile error at the .list part of cmbpresets.list and says that 'the argument is not optional'. What is my problem here? I'm sure this problem is simple and I'm probably just making a stupid mistake. What code do I need to use?
Thanks
Now, don't get me wrong, 'cause baseball's a great sport.
It teaches little children simple eye-hand coordination with little effort or exhaustion.
-byufan
Edited by - byufan on 7/20/2004 4:20:57 PM
2 List Boxes, 1 INI File
I have 2 list boxes on my form, when the program runs it opens a INI file and shows its contents (text) if the 1st ListBox.
1.abc
2.abc
3.abc
4.abc
.Etc
The 2nd list box shows the contents of a program folder.
1.cba
2.cba
3.cba
etc.
What I am trying to do is set it up so when I click on an item from the 2nd listbox (like 1.cba) it is put at the bottom of the list of Listbox 1.
Code:
Private Sub Form_Load()
Dim iniFile As String, ItsThere As Boolean
INI1.FileName = App.Path & "xtt.ini"
iniFile = App.Path & "xtt.ini"
ItsThere = FileExists(iniFile)
Dim lPos As Long
Dim lCount As Long
lPos = 1
Do
lPos = InStr(lPos, INI1, ".xtt", vbBinaryCompare)
If lPos Then
lCount = lCount + 1
lPos = lPos + Len(".xtt")
Else
Exit Do
End If
Loop Until lPos < 1
txtNumber.Text = lCount
End Sub
Private Function FileExists(FullFileName As String) As Boolean
On Error GoTo MakeF
Open FullFileName For Input As #1
Close #1
FileExists = True
Exit Function
MakeF:
FileExists = False
End Function
Private Sub ReadFile()
Dim intFileNum As Integer
Dim strLineIn As String
INI3.Clear
If Dir$(Common1.FileName) <> "" Then
intFileNum = FreeFile
Open Common1.FileName For Input As #intFileNum
While Not EOF(1)
Line Input #intFileNum, strLineIn
INI3.AddItem strLineIn
Wend
Close #intFileNum
End If
End Sub
Also, how do I get rid of these
[]
=250
I need to get rid of the [] and the =
Code:
Dim iniFile As String
iniFile = App.Path & "xtt.ini"
WriteINI "", "", INI1.Text, iniFile
Thanks.
File/Dir List Boxes
Can anyone tell me how to link a file and dir list box, i.e. when the dir box changes the list boxes refreshes to display the contents of that directory. Basically I want the user to be able to select a file, i.e. an image from a dir and the image to appear in a picture box on the same form. any ideas?
cheers!
File List Boxes?
Hello again everyone,
I'm attempting to list text files from a folder into the filelistbox, but I need to verify these files for a particular word in the text to make sure it's the correct file to be listed in the filelistbox.
I'm stuck on how to do this, any suggestions?
Kind Regards,
Kind Regards,
Drumsticks
File List Boxes
Which ActiveX control lets me have those list boxes with selection buttons at the top? I'm talking about those list boxes that let the use sort by Name, Size, Date, etc. by clicking on buttons at the top of the box. Gozilla, FTP applications, Netscape Messenger, etc. all have this type of box. Also, how could I get a graphical file list box similar to Windows Explorer? Thanks in advance.
File List Boxes
Which ActiveX control lets me have those list boxes with selection buttons at the top? I'm talking about those list boxes that let the use sort by Name, Size, Date, etc. by clicking on buttons at the top of the box. Gozilla, FTP applications, Netscape Messenger, etc. all have this type of box. Also, how could I get a graphical file list box similar to Windows Explorer? Thanks in advance.
Drive List Box / Dir List Box
I have a Drive List Box and a File List Box in my application.
I want the default path of the DirListBox to be a network path.
The problem is, the Network path is not always mapped on every PC.
For example: the path is: //svr1/data or \svr1data, i forget which one.
DirListBox.path = "//svr1/data" gives errors.
Any help?
Thanks in advance,
-Luc
Multi Selection In File List Boxes
When I use multi selection in a file list box it only tells me the last file used, is there a way for it to tell me all the files currently selected instead of the last one?
p.s: I have the multiselect propriety's value in 1
Filtering A Text File To List Boxes
Hey,
i need some help with a VB project,
2 list boxes and a text file with all of the peoples names in them, they also have small codes next to them for example, 12Y7 and 43G2
i need to filter the text file so it puts all the codes with Y into one list and the ones with G into the other, with the names they are saved with
i'm not sure if that makes much sence
thanks
OLEDragDrop W/ Directory And File List Boxes?
I'm trying to drag and drop files from a file list box to a directory list
box (the two controls are not related). Does anyone have an examples of
this? I've got the properties setup correctly on the two controls and I'm
starting the OLEDrag method of the file list box using the mouse down event.
This calls the OLEStartDrag where I am attempting to get the Data control
object setup. I think this is where my problem may be. The OLEDragDrop of
the directory list box doesn't recognize a drag from the file list box (no
visual cues even though the OLEDragOver of the directory list box is setup).
I guess I don't understand how to add files to the Data object from the file
list box. Any help would be GREATLY appreciated! Thanks
Reading Data From A Single File To Two List Boxes
hi,
i an trying to copy text from a file into two list boxes. all the data is stored in one file and is stored as such
car.gif,lambo,italy
por.gif,Porche,Germany
what i want to do is seperate the data and use only the last two items to input them into list boxes.
one for car type and one for country of origin.
all data will be loaded at form load and the gif is randomized. the items are entered into an array and when the user enters the correct choice of country and car type they are given a point.
can any one please help??
thanks
wullb
Dir List Box And File List Box Help Needed
Dim results As String, dummy As String
Dim Endpart As String
Dim datapath As String
datapath = "C:data171916data"
' open the text file
Open App.Path & "
esultscash.txt" For Output As #1
' start searching the folder for any csv files
results = Dir(datapath & "*.csv")
this code reads all the .csv files from the C:data171916data
what i wan to do is to add a Dir list box so that i can select the data path variable and then want to display all the csv files in a file list so that i will be able to select which files i want to read and then process
in short the datapath's value should be the value of Dir list box and instead of where im using *.csv it should be the files which i choose from the file list box
Dir List Box And File List Box Help Needed
Dim results As String, dummy As String
Dim Endpart As String
Dim datapath As String
datapath = "C:data171916data"
' open the text file
Open App.Path & "
esultscash.txt" For Output As #1
' start searching the folder for any csv files
results = Dir(datapath & "*.csv")
this code reads all the .csv files from the C:data171916data
what i wan to do is to add a Dir list box so that i can select the data path variable and then want to display all the csv files in a file list so that i will be able to select which files i want to read and then process
in short the datapath's value should be the value of Dir list box and instead of where im using *.csv it should be the files which i choose from the file list box
Select Folder Dialog. List All Folders And Subfolder In List View
Hello all.
I am trying to select a folder in a folder dialog. I then want it to list all the folders and subfolders and files within the selected folder in the list view.
this is what i have so far. It just lists all the first children folders of the selected folder. any help on this?
Code:
Private Sub addFolders()
FolderBrowserDialog.ShowDialog()
ListView1.Items.Add(FolderBrowserDialog.SelectedPath) 'lists top selected folder
Dim STF As New IO.DirectoryInfo(FolderBrowserDialog.SelectedPath)
Dim F As IO.DirectoryInfo
'lists each folder inside top folder
For Each F In STF.GetDirectories()
ListView1.Items.Add(F.Name)
Next
End Sub
Finding List Item As U Typed In Combo Box(Dropdown List Style).
Basically the title say it all.
When I type a letter in combo box it finds item by matching the letter that I typed, but when I type in a second letter it searchs item that starts with the second letter.
I wonder is there a way to macthing list item as u typed in combo box(Dropdown List style).
Thanks in advance.
Joon
Create A Property Window Dropdown List AKA Listbox List/ItemData
I'm trying to create an enhanced listbox control (in VB6) and one of my main criteria is to make it funtion very similarly to the standard listbox control.
Creating dropdown lists of constants (i.e. the Style property) is easy enough. but I haven't been able to re-create the ability to add (array) items in the property window such as is possible with the standard Listbox List and ItemData properties.
Anyone know how (or if) this can be done in VB6?
Regards
Ant
Create List Of Files From Folder But Allow Double Click On List Item To Run Bat
I am a newbie
But am making some progress
My next plan is to make a simple dialog with a list box and 3 buttons to do the following
List all the batch files in a folder
then allow me to highlight one item in the list so when I click the button it will run that bat file.
Sounds easy enough but I just keep hitting a brick wall and am not making any progress at all.
All help or similar snipits of code that I can re-organise will be greatfully apperciated.
Thanks in advance
HighLight List Box Selected List Item With User Defined Color
Hi Friends,
I need a help from u all. My problem is to change the Backcolor of the selected listitem of a listbox.
Let me explain detail. Normally in a listbox if we selected the list, the list item will be highlited with blue backgroud (ie. the selected item color settings of the system). Now I need to hightlight the selected list in the list box with my own color say red, green or something else.
Would anyone help me.
V.P. Vijayavel
Excel - Dropdown Showing List 2 Dependant On What Was Chosen In List 1
I'm programming VB in Excel. I've created a series of simple lists in a worksheet. I would like to select one object from list 1 in a cell in column A and then have the cursor cell move to the right neighbouring cell and present me with a dropdown menu showing the contents of another list dependant on what was chosen in the first cell. Is there a specific command for this?
Many thanks for any help.
What Is The Limits On COmbo Box, List Box And LIst View And How Do You Handle Situations W
OK<
I have looked at all 5 of my vb Barnes and noble books
under listbox
and did not find where it said what the limit was.
I learned how to read a data base (unbound even) into a list box, or combo box.
But now I have over 32,768 items,
my data base list has between 100,000 - 125,000 Parts I want to load.
I can think of a lot of cases where the data base you want to load into a list or combo box is well of 32768
So my questions are
( I did also search VBCITY)
1) What is the limits on
listbox
combo box
list view
and
where is it documented.
and 2
How do I handle the case of more than 32768 with a listview??
I did found a little bit about it on vbcity
Thanks
Changing To A List View Instead Of A List Box To Overcome 32768 Limits
I had the program done
I was loading a listbox and typing is a text box watching the closest match be selected.
I start off by filling the list box from a mdb with a table called partlist,
and a field called part numbers
It worked fine.
But now because I am over 32768 ( I will never go over 125,000) records, I am past the usefullness of a list box I guess.
so How do I change this code that works with a listbox, to code that works with a viewbox
and is this my best solution
Here is the listbox working code
Public Function FillListboxparts(Optional PartNumber As String)
Screen.MousePointer = vbHourglass
Dim li As ListItem
Dim lih As ListItem
Dim cnn As ADODB.Connection
Dim rsPartList As ADODB.Recordset
Dim strSQL As String
strSQL = "SELECT PartNumber From partlist"
Set cnn = New ADODB.Connection
cnn.Open ConnString
Set rsPartList = New ADODB.Recordset
rsPartList.Open strSQL, cnn
While Not rsPartList.EOF
listboxparts.AddItem rsPartList("Partnumber")
rsPartList.MoveNext
Wend
Text1.Text = listboxparts.ListCount
rsPartList.Close
Set rsPartList = Nothing
cnn.Close
Set cnn = Nothing
Set li = Nothing
Set lih = Nothing
Screen.MousePointer = vbDefault
End Function
Drive List
Does anyone know how to create a drive list (tree) in MS Access for import/export specifications?
Jmas46
Drive List Box
Hello,
I am trying to change the drives on the drive List box. I want to remove the C: drive because I don't want to change anything important accidentally since I am still in the process of testing my "Save" (and I don't think I want it to be there when the interface is done either). I want to add the " My Documents" and "Desktop" to the list. How do I do this?
How Do I Get The List Of Drive Name?
I what to get the list of drive names and print them out on the form.
How would i go about doing this?
I tried Drive1.ListCount and that only gives the number of drives. I what to print the names.
UNC In A Drive List Box?
I just realized that the Drive box doens't let you go out to a network server... (yea me smrt)
anyway.. is there any way to let the user go to a network path to open a file?
Drive List Box
Hey guys, I have a textbox called text24 and what I use it for is as a scan source, like if I wanted to search the C: for something then I type C: in the text box.
However I was wondering how I can replace the text24 with a drv list box?
Or maybe when some location is picked in the drive list box it relays the location to a text24?
Thanks!
Drive List Box.
I want to Hide the a: in the Drive list box.Can some body help with API
Drive List Help
When I Choose The Option D: (CD Drive) and there is no Cd in the drive i get an error message,
is there a way to make it do nothing
Thanx
Lavarock09
Help With Drive List
okay so im using the drivelist/folderlist/filelist combo of list boxes to get computer files....
i also have another box that holds other computers on the network (i have to input these myself)
I can use "\willc" but not "\will" to get to the computer....
few quesitons:
how can i see all computers on the network using a combo box?
how can i use the combo box to change which computer the drive list is pulling its drive list from?
VB Code:
Private Sub Combo1_click()Dir1.Path = Combo1.TextEnd Sub Private Sub Dir1_Change()File1.Path = Dir1.PathEnd Sub Private Sub Drive1_Change()On Error GoTo drive_errorDir1.Path = Drive1.DriveExit Subdrive_error:MsgBox ("The drive selected seems to be unavailable.")End Sub Private Sub Form_Load()Combo1.AddItem ("\WillC")End Sub
code so far... just testing things out
Drive List Box
I am trying to load a form and set a drive list box. It will not load a floppy drive if the floppy is not in the disk. I get a Device Unavailable error. Is there a way to use this control and not have to test for the media in a disk drive?
Thank you now for your help.
Drive List Box
I want to view the path directory in Unix with Drivelistbox. Is this possible ?
Is possible, how do i do it ?
Drive List Box??
I'm using a drive list box....
is there a way to only show cd rom drives (anytype i.e. CDRW or DVD)
i don't want the floopy dirve and hard drives showing...
thanx
--770
Drive List Box
Here's the problem of all problems. I have a Drive, Directory, and File List box. What I need, is when a drive is selected, and a search button clicked, I need it to scan ALL folders and files in that drive for zip files. How do I get it to search everything? Help...
|