Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 6th, 2004, 09:07 AM
Registered User
 
Join Date: Oct 2004
Location: , , .
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
   Get
      '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"
   Else
      '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.
Reply With Quote
  #2 (permalink)  
Old October 9th, 2004, 05:02 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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.

Thearon
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 11:52 AM
Beg. ASP.Net eCommerce with VB.Net - Chapter 5 James Hendrix All Other Wrox Books 0 October 22nd, 2003 10:45 PM



All times are GMT -4. The time now is 12:03 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.