I have problem here.. i have textbox that store path location. It show in the textbox as C:\\ . How I can show in the textbox as C:\ ?
Dir1.Path = Text1.Text
Printable View
I have problem here.. i have textbox that store path location. It show in the textbox as C:\\ . How I can show in the textbox as C:\ ?
Dir1.Path = Text1.Text
you post is not clear. Do you want whatever path typed in the textbox to become the path for the Dirlistbox? if so you can use
Note use of On Error Resume Next is not recommended. I've used it just to show you the usage..Code:Private Sub Text1_Change()
On Error Resume Next
Me.Dir1.Path = Me.Text1.Text
End Sub
Drivelistbox does't change. How to change the drivelistbox?
change with what??? :confused:Quote:
Originally Posted by matrik02
there are various events under which the changes can be coded to happen (say click, double click, got focus,lost focus etc)
Matrik02,Quote:
Originally Posted by matrik02
Where does this C:\\ come from? If you turn your statement around, Text1.Text = Dir1.Path you will never get a double slash... So where do you get the text displayed in Text1?
A'a I found it, I have code on this. In the textbox show D:\Project, but why my drivelistbox show C: drive? How to change this to D: ?I only have this code onlyQuote:
Originally Posted by Jottum
Code:Dir1.Path = Text1.Text
There's also a Drive listbox, you can use them together;Quote:
Originally Posted by matrik02
vb Code:
Dir1.path = Drive1.Drive
will get you to the root of the drive you've selected in Drive1
I have fix this, here it is
Code:Private Sub Command1_Click()
Dir1.Path = Text1.Text
Drive1.Drive = Text1.Text
End Sub
Private Sub Form_Load()
Text1.Text = "D:\career"
End Sub