Wrox Programmer Forums
BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
This is the forum to discuss the Wrox book Professional VB.NET 2003 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Jonathan Pinnock, Rama Ramachandran, Bill Sheldon; ISBN: 9780764559921
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 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 October 6th, 2004, 09:07 AM
Registered User
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 5 and 6 of Beg. VB.Net 2003

Can somebody please tell me what I did wrong because I followed the book and looked at the code in the Wrox website an it still does not solve my issue.

For chapters 5 and 6:

Chapter 5:
Public ReadOnly Property SelectedCustomers() As Customer
     'do we have a selection
     If lstCustomers.SelectedIndex <> -1 Then
     'return the selected customer...
     Return lstCustomers.Items(lstCustomers.SelectedIndex)
End Get
End Property

Chapter 6:
'UpdateDisplay- update the display...
Public Function UpdateDisplay() As String
     'What text do we want to use?
     Dim strCountText As String = txtWords.Text
     Dim strResultText As String
     'do we want to count words?
     If radCountWords.Checked = True Then
     'count the words...
     Dim intWords As Integer = CountWords(strCountText)
     'return the text...
     strResultText = intWords & "words"
     'count the chars...
     Dim intChars As Integer = CountCharacters(strCountText)
     'return the text...
     strResultText = intChars & "characters"
End If
     'update the display...
     lblResults.Text = strResultText
End Function

Every time I run and change this code to the book it says that my If statement needs a null set value set or all the possibilites will not be considered during runtime. I appreciate if anyone can tell me what I need to do and what I did wrong. Thanks.
Old October 9th, 2004, 05:02 AM
Thearon's Avatar
Wrox Author
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts

The If statement for your code from Chapter 5 needs a closing End If statement. My question to you is have you downloaded and tried running the code samples from Chapters 5 and 6? I would do this and compare that code against the code that you created.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning VB.NET 2003 Chapter 16 siegmeister BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 7 October 8th, 2012 11:29 AM
Beginning VB.Net 2003 - Chapter 16 dougmcgee BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 7 July 15th, 2005 04:42 AM
ASP.NET 1.1 with VB.NET 2003 chapter 1 subroger Wrox Book Feedback 2 November 11th, 2004 12:52 PM
Beg. ASP.Net eCommerce with VB.Net - Chapter 5 James Hendrix All Other Wrox Books 0 October 22nd, 2003 10:45 PM

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