|
-
Oct 5th, 2008, 07:13 PM
#1
Thread Starter
New Member
I know the logic, but its killing me why this isn't working
Basically I have a program thats supposed to gather information, both as string and as double.
There are to be two sub procedures used
One for gathering input and another for printing that input out into a listbox
I'm not sure how to pass the information that I got using Input() sub procedure to Output() sub procedure.
I know once I have it passed its a gravy train, all I need to use is ListBox1.Items.Add function to print what I want in the listbox
However I'm getting errors like "Error 1 Too many arguments to 'Public Sub Input()'. C:\Users\Documents\Visual Studio 2008\ProjectsForm1.vb 16 15 Lab6
"
So the way he wants me to do this, I can't just declare variables on the class level as far as I'm aware. The input() sub procedure (which I have to declare myself, it's not built in) has to pass data to output() sub procedure again which I have to declare) and then I can get it from there.
There are several variables
Organization Visited, Dates, and Location are all string variables
Expenses for meals and entertainment, airline fees, lodging, and taxi fares are all variables defined as Double
heres my source code
Public Class Lab6
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
lstResults.Visible = True ' list box is only to appear once button pushed
lstResults.Items.Clear() ' clears out previous results
Input()
Output()
End Sub
Sub Input() ' gathers all the information the form asks for and assigns
' it to variables so that sub Output() can read the variables
' and then print them in the list box
End Sub
Sub Output() ' prints out items gathered from sub Input()
' * note that meal and entertainment expenses are only
' 50% decutable, not the whole amount
' Calculation must be made where 50% meals and entertainment expense = CDBL(meals and entertainment expenses) * .50
End Sub
End Class
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|