Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Nov 24th, 2006, 7:37 PM   #1
dwizzle13
Newbie
 
Join Date: Oct 2006
Posts: 19
Rep Power: 0 dwizzle13 is on a distinguished road
Format Exception Error

Hi, I have a format exception error when I try and calculate the price of a product and service in a program using menu bars in vb. I'm not sure what's wrong except there's an error with index(zero-based) not being the correct size. Here's the small portion of the code (the error is in a portions like this.)
 If rad2.Checked = True Then
            If radF.Checked = True Then
                total = 12.0
                'add deposit and display
                Deposit = 30.0
                total = total + Deposit
                total = FormatCurrency(total, 2)
                lstOutput.Items.Add(String.Format(fmtTable, "Lawn mower  ", FormatCurrency(12.0, 2), "(Full-day rental)"))
                lstOutput.Items.Add(String.Format(fmtTable, "Deposit", FormatCurrency(Deposit, 2)))
                lstOutput.Items.Add("----------------")
                lstOutput.Items.Add(String.Format(fmtTable, "Total", FormatCurrency(total, 2)))
            End If

Just please tell me what to do to correct it, I only know up to menubars and select case, it's for my comp. science class. Thanks.
dwizzle13 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C# corruption!!! Kilo C++ 32 May 21st, 2006 8:44 PM
Masm rsnd Assembly 4 May 20th, 2006 9:05 PM
Could some please explain classes to me... TCStyle C++ 10 Feb 20th, 2006 3:51 PM
libraries matko C 1 Jan 22nd, 2006 2:12 PM
HELP please!!! hamacacolgante C 7 Nov 21st, 2005 5:36 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:44 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC