VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Opens a text file and reads in sales values for sales reps, then writes out a report to a text file

Matthew Holton  (1 Submission)   Files/File Controls/Input/Output   Visual Basic 5.0   Unknown Difficulty   Sun 11th November 2001   Mon 8th February 2021

Opens a text file and reads in sales values for sales reps, then writes out a report to a text file.

API Declarations



'*****************************************************************************
' Sales Reporting
'-----------------------------------------------------------------------------
'
' Opens a CSV Data source, reads the sales information and
' generates a series of reports based on these reports.
'
' This module was desinged to be incorporated inside of
' Excel.
'
'
' Author: <Your Name Here>
' Date Create: 11/11/2001
'
' Procedures Included:
' 1. Sub Main() - Wrapper for the whole thing. We start here
' 2. Func ReadData() as Boolean - Has the user select the input file
' and reads the data in. Data is then
' populated into an array arrSales().
' 3. Func ComputeData() as boolean - Base function to run all the calc-
' ulations.
' 4. Func AvgSales() as Boolean - Averages the sales for each sales person.
' 5. Func GetPay() as Boolean - Populates an array with amount to pay.
' 6. Func WriteReports() as Boolean - Generates any reports needed
' 7. Sub CleanUp() - Releases objects from memory and destroys vars
'
' Modifications:
' None
'
'*****************************************************************************

'Local variables
Dim arrSalesPPL() As Long 'Used to validate our sales ppl
Dim arrSales() As Currency 'Used to hold sales information
Dim arrPay() As Currency 'Used to hold payment information
Dim AVGSales As Currency 'Used to hold the average sales amount
Dim iSaleCount As Long 'Used to count the number of sales that we have
Dim cSaleValue As Currency 'Used to hold the GrandTotal of All Sales
Dim IsInit As Boolean 'Used to state that this module was properly initialized


Rate Opens a text file and reads in sales values for sales reps, then writes out a report to a text file (1(1 Vote))
Opens a text file and reads in sales values for sales reps, then writes out a report to a text file.bas

Opens a text file and reads in sales values for sales reps, then writes out a report to a text file Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters