Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 by Thearon Willis, Bryan Newsome; ISBN: 9780764574016
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 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
  #1 (permalink)  
Old February 25th, 2006, 08:31 PM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap 3, "Length of String"

on page 55, the authors instruct to write:

'Get the text from the TextBox
strData = txtString.Text

...but i get an error saying, "Name txtString is not declared."

Here's what I've typed in Visual Studio:

        'declare variable
        Dim strData As String
        'get text from textbox
        strData = txtString.Text
        'display length of the string
        MessageBox.Show(strData.Length & " character(s)", "Length")

any suggestions?

  #2 (permalink)  
Old February 25th, 2006, 08:38 PM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oops, Sorry!
Just realized I had to name the textbox.
All now works.
:)



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fix string length Ivanchan Excel VBA 2 July 26th, 2007 08:55 AM
string-length problem alapati.sasi XSLT 3 July 4th, 2007 10:08 AM
How to loop a command for a string length? LordJaffa Excel VBA 5 June 5th, 2007 10:20 PM
Changing length of string automatically ryanvdm2 Classic ASP Basics 5 September 4th, 2005 06:20 PM





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