My Code - Private Sub btncalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncalculate.Click
-
Dim oldBalance, charges, credits As Double
-
InputData(oldBalance, charges, credits)
-
DisplayData(NewBalance(oldBalance, charges, credits), MinPayment(NewBalance(oldBalance, charges, credits)))
-
-
End Sub
-
Sub InputData(ByRef oldBalance As Double, ByRef charges As Double, ByRef credits As Double)
-
oldBalance = CDbl(txtoldBalance.Text)
-
charges = CDbl(txtcharges.Text)
-
credits = CDbl(txtcredits.Text)
-
-
End Sub
-
Function NewBalance(ByVal oldBalance As Double, ByVal charges As Double, ByVal credits As Double)
-
NewBalance = oldBalance + charges - credits + (oldBalance * 0.015)
-
-
-
End Function
-
Function MinPayment(ByVal NewBalance As Double, ByVal oldBalance As Double, ByVal charges As Double, ByVal credits As Double) As Double
-
If NewBalance <= 20 Then
-
Return NewBalance
-
Else
-
Return 20 + (NewBalance - 20 * 0.1)
-
-
End If
-
-
End Function
-
-
Sub DisplayData(ByVal NewBalance As Double, ByVal MinPayment As Double)
-
txtNewBalance.Text = FormatCurrency(NewBalance)
-
txtMinPayment.Text = FormatCurrency(MinPayment)
-
-
-
End Sub
-
-
Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
-
Me.Close()
-
-
End Sub
-
End Class
blue lines under this - code-MinPayment(NewBalance(oldBalance, charges, credits)))
-
error 1- argument not specified for parameter 'charges' Public Function(NewBalance As Double,oldBalance As Double, charges As Double, credits As Double) As Double
error 2-argument not specified for parameter 'credits' Public Function(NewBalance As Double,oldBalance As Double, charges As Double, credits As Double) As Double
error 3-argument not specified for parameter 'oldBalance' Public Function(NewBalance As Double,oldBalance As Double, charges As Double, credits As Double) As Double
1 1368
It looks like you havn't filled out your args all the way,
this is what you have; -
DisplayData(NewBalance(oldBalance, charges, credits), _
-
MinPayment(NewBalance(oldBalance, charges, credits)))
-
this is what it should be; -
DisplayData(NewBalance(oldBalance, charges, credits), _
-
MinPayment(NewBalance(oldBalance, charges, credits),oldBalance,charges,credits))
-
notice the extra ,oldBalance,charges,credits they fullfill the other minPayment args.
Hope this helps,
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Dan |
last post by:
I've run into an interesting problem, and seemed to have stumped 3
newsgroups and 2 other forums.
For some reason when I try to insert a record into a SQL table that has a
Text column, the...
|
by: WGW |
last post by:
Though I am a novice to MS SQL server (2000 I believe), I can do almost!
everything I need. Maybe not efficiently, but usefully. However, I have
a problem -- a complex query problem...
I can...
|
by: John A Grandy |
last post by:
Is there something special in XML about the name "Parameter" ... I am not
able to XPATH query for nodes named "Parameter"
<Root>
<Category CategoryID="1">
<Elements>
<Element...
|
by: PK |
last post by:
Hi, I have an application that opens a Crystal report document and
passes in a value to a parameter in the report (pointing to an Oracle
DB). However, if I want to pass a "null" value to retrieve...
|
by: Richard Grant |
last post by:
Hi. In c/C++ i can pass the address of a subroutine to another subroutine as an actual parameter
How do I do that in VB .NET
What should be the syntax for a parameter to receive the address of a...
|
by: Ranginald |
last post by:
Hi,
I'm having trouble passing a parameter from my default.aspx page to my
default2.aspx page.
I have values from a query in a list box and the goal is to pass the
"catID" from default.aspx...
|
by: hzmonte |
last post by:
Correct me if I am wrong, declaring formal parameters of functions as
const, if they should not be/is not changed, has 2 benefits;
1. It tells the program that calls this function that the...
|
by: Ken Cox [Microsoft MVP] |
last post by:
I've been going around and around on this one. I can't believe that it is
"by design" as Microsoft says.
Here's the situation:
In *declarative* syntax, I'm trying to create a default datetime...
|
by: exipnakias |
last post by:
Hello Guys. In a form I created a listbox which looks up the values of a table.
I want:
1)
..to create a query where a parameter will be needed in order to be loaded.
But I do not want to...
|
by: Trevisc |
last post by:
Happy Thursday Everyone,
I am trying to create a parameter that is one long varchar but that
will be used in a SQL statement IN function:
//string queryString = GetCurrentTitles();
//Below is...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |