-
Hiyas, I am having a little bit of trouble with the dir box, it is a hidden it is linked to a file box so when the dir box path changes so does the file boxes path, that parts of it works, I set the path when it loads but I need to select the a folder inside this folder (the folders would be different on each computer) so I increase the listindex of the dir function by 1, but I can't seem to get it to select that folder (mimic the user double clicking the box) so the files in the file box change to that folder, I tried using the sendmessage api and sending the left button double click constant to the dir but that didn't select that item, neither did using the sendkeys and sending enter to the dir box. any ideas how to select a item from the dir box?
thanx.
-
What are you actually trying to do here?
If you want to highlight the next Dir the method you're using will work.
If you want to select the next dir (make it the current dir in the DirLists Path property) then you need to set the Path Property, i.e.
Code:
Dir1.Path = Dir1.List(0)
-
Do you mean change to different folders when they are clicked on?
Code:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
And to select a certain item:
-
hi thanx for replying, I already no that, I don't know what the first sub folder in the directory will be be, so I can't use the .path method, so I am trying to get it to change the path to the next item, but I don't know what the folder will be so I can't change it with the dir.path = method.
-
Yes you can because you Do know what the next folder is, it'll be in List(0)
-
thanx
ok thanx Aaron :) I didn't realise the list option held the sub path, I was using the listindex option to change it, thanx for that.