Wrox Programmer Forums
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 26th, 2008, 07:28 PM
Registered User
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to julz127
Default Text Strings need help!

ive got two textboxes and each one has a path in it

textbox1.text "C:\folder\folder\file.txt"

textbox2.text "C:\folder\"

how can i remove textbox1's text from textbox2?

if your reading this i probably need help with code!
 
Old January 26th, 2008, 09:43 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Try if the following is what you need:

TextBox1.Text = Replace(TextBox1.Text, TextBox2.Text, "")

Cheers
Shasur

http://www.dotnetdud.blogspot.com

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
 
Old January 26th, 2008, 09:49 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Do you mean the other way around? You won't be able to take the longer string away from the shorter one.

Presuming that is what you mean then you'd do something like this:

textbox1.Text.Replace(textbox2.Text, String.Empty)

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Place text strings in a text box error_help Excel VBA 1 October 6th, 2005 05:26 AM
Deleting text strings automatically from Database palvin SQL Server 2000 15 October 3rd, 2005 12:52 PM
Strings ldoodle Classic ASP Basics 0 June 28th, 2005 09:26 AM
strings Moharo Pro PHP 2 May 17th, 2004 06:15 AM
strings... slowhand BOOK: ASP.NET Website Programming Problem-Design-Solution 1 January 5th, 2004 06:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.