Archived

This topic is now archived and is closed to further replies.

firefly2442

Another Visual Basic Question

Recommended Posts

The string search works. But now I need to delete the file ending in the string. For example: String = "text.txt" But I want to get rid of the .txt ending and just save it as text How do I do that? -Thanks

Share this post


Link to post
Share on other sites

String = "text.txt"

String = Mid(String, 1, Instr(String, ".txt") - 1)

''String = "text"


I hope I don''t get flamed for putting Visual Basic code in code tags. Its amazing how everyone laughs at VB on these forums but given a certain vb releated thread it can accumulate quite a few replies.

Firefly: Most people would appreciate if you continue on with your old thread instead of starting fresh since this was a continuation of your other homework question.

Share this post


Link to post
Share on other sites