| 416-621-9348 cgreaves@chrisgreaves.com | |
|---|---|
| Home Services Products |
| Best Fit Algorithm (Home) | The Macro | Building The Data Array | Printing The Best Fit Results | A Typical Data Table | Results Of Best Fit |
|---|
Building The Data Array
Function GetVCRArray(doc As Document, lngItemList(), lngMaxRowIndex) Dim tbl As Table Set tbl = doc.Tables(1) Dim rw As Row For Each rw In tbl.Rows If Val(UW.strCellText(rw.Cells(2).Range)) > 0 Then lngItemList(intcCBIndex, UBound(lngItemList, 2)) = 0 lngItemList(intcCBWidth, UBound(lngItemList, 2)) = UW.strCellText(rw.Cells(2).Range) lngItemList(intcCBRowIndex, UBound(lngItemList, 2)) = 0 lngItemList(intcCBName, UBound(lngItemList, 2)) = UW.strCellText(rw.Cells(1).Range) lngItemList(intcCBLeft, UBound(lngItemList, 2)) = 0 ReDim Preserve lngItemList(UBound(lngItemList, 1), UBound(lngItemList, 2) + 1) Else ' ignore unknown lengths End If Next rw End Function
Loading
Toronto and Mississauga, Friday, December 03, 2010 8:39 AM
Copyright © 1996-2010 Chris Greaves. All Rights Reserved.