p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 (http://p2p.wrox.com/forumdisplay.php?f=226)
-   -   What is the correct code on page 441 - 442? (http://p2p.wrox.com/showthread.php?t=75201)

Grace July 11th, 2009 10:18 AM

What is the correct code on page 441 - 442?
 
Code:

Public Sub AddColor(ByVal newColor As Color)
Dim objColorPaletteButton As New ColorPaletteButton(newColor)-  Error 1
Buttons.Add(objColorPaletteButton)- Error 2
End Sub

After run,
-Error 1 Array bounds cannot appear in type specifiers.
-Error 2 Name 'objColorPaletteButton' is not declared.

bnews987 July 12th, 2009 01:13 PM

Grace,

I cannot see anything wrong. Can you download this chapters code and see if you can find the difference? You can download it at

http://www.wrox.com/WileyCDA/WroxTit...-DOWNLOAD.html

Bryan

Grace July 12th, 2009 02:59 PM

Can you fix this little problem? Because, this problem will effect the rest steps on the chapter 14, I couldn't get result same as on the page 444, Figure 14-3, I really want to know this chapter.

bnews987 July 12th, 2009 11:58 PM

You will need to put in all of your class code for more help. Your code looks correct. Bryan

Grace July 13th, 2009 06:20 AM

Thanks, Bryan, I only add two more colors and recopy the errors.


All times are GMT -4. The time now is 01:53 AM.

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