Vasi04
asked on
displaying file name in the textbox
Onload VB form, I want to search for a file name in c:\temp, read only the name of the file (without extention) and display in the textbox of the form.
for example, file name = john.txt in c:\temp
In the textbox "JOHN" is displayed (in upper case) as soon as user opens the VB form.
Please help me code.
for example, file name = john.txt in c:\temp
In the textbox "JOHN" is displayed (in upper case) as soon as user opens the VB form.
Please help me code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
text1.text = UCase(Left(f.Name, Len(f.Name) - 4))
hi
that should not be like this
text1.text=text1.text & vbcrlf & UCase(Left(f.Name, Len(f.Name) - 4))
and set the multiline property of text box to true then the file name will be added with the enter key.
Regards
Abith. K
that should not be like this
text1.text=text1.text & vbcrlf & UCase(Left(f.Name, Len(f.Name) - 4))
and set the multiline property of text box to true then the file name will be added with the enter key.
Regards
Abith. K
Like the above experts mentioned, Use
text1.text = text1.text & vbcrlf & UCase(Left(f.Name, Len(f.Name) - 4))
Set
Text1 Multiline property to True
Text1 Scrollbars property to Vertical or Both or Horizontal
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
EDDYKT, are we assigning filename to text1.text
can I have this way:
text1.text = List1.AddItem UCase(Left(f.Name, Len(f.Name) - 4))