Jump to content
  • Advertisement

Archived

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

Another Visual Basic Question

This topic is 5937 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!