Databases Reference
In-Depth Information
FIGURE 10.4
Workbook template utilized for example ADA macro.
frm10ADA.Textbox_Omax.Text = str(OhmMax)
frm10ADA.TextBox_Omin.Text = str(OhmMin)
frm10ADA.TextBox_Vmax.Text = str(VMax)
frm10ADA.TextBox_Vmin.Text = str(VMin)
End Sub
A Workbook is created to hold the Calculations the Application will make on the strain gage
data. The Workbook is created from an existing template called “ADA_Template.xlt.” The name
of the Workbook to hold the data is stored in the Public variable CalcBook.
CalcBook = Open_Template
("C:\Program Files\Microsoft
Office\Templates\ADA_Template.xlt", "c:\temp\ADA_Example.xls")
Figure 10.4 shows the Workbook template utilized for the example macro. The Workbook
template contains six Worksheets. Notice that some of the Worksheets have cells with predefined
formulas in them. Developers may do this as a shortcut if they are certain that the reports they
create will be
. If reports will always contain the same data and
parameters in identical cells from run to run, this can be a big time-saver as it saves the developer
from having to write VBA code to apply formulas to specific cells.
The template utilized for this example contains six Worksheets. The functions of each Worksheet
are detailed in Table 10.1.
The challenge now is to create a macro that can run an analysis of the given data files and
generate the report Worksheets detailed in Table 10.1.
absolutely uniform each time
TABLE 10.1
ADA Sample Application Worksheet Functionality
Worksheet Name
Function
1
RowRpt
Analysis of rows
2
ColRpt
Analysis of columns
3
STDEV
STDEV of lot
4
AVG
Averages of lot
5
ORAVG
Averages of lot with outliers removed
6
Compare
Comparison of AVG and ORAVG Sheets
 
Search WWH ::




Custom Search