Link to home
Start Free TrialLog in
Avatar of Vasi04
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.
ASKER CERTIFIED SOLUTION
Avatar of bkthompson2112
bkthompson2112

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Vasi04
Vasi04

ASKER

Thanks both of you.
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))

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

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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial