• ### Announcements

#### Archived

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

# 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 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 on other sites
Ok sorry bout that. Thanks for the reply!
-FireFly

• ### Forum Statistics

• Total Topics
627736
• Total Posts
2978869

• 10
• 10
• 21
• 14
• 12