Pass Top Down Code

The skeleton code of pass 1 needs to be fleshed out. The easiest routine to complete is the addWiringWSTag:

Sub addWiringWSTag(aWS As Worksheet) Application.EnableEvents = False On Error GoTo ErrHandler aWS.Range(cWSWiringTagAddr).Value = cWSWiringTagID Application.EnableEvents = True Exit Sub ErrHandler:

MsgBox "Unexpected error in addWiringWSTag:" & vbNewLine _ & "Error=" & Err.Description & " (" & Err.Number & ")" Application.EnableEvents = True End Sub

Next, address createWiringData. This creates the grid of m/nnn values ranging from 1/101 in A1 to 10/700 in CV60. These consist of 10 blocks of values m/101 to m/700 (m=1,2,..,10) with each block containing 60 rows by 10 columns. This is basically how the code creates the grid. It creates one block of nnn values, duplicates it 9 times (for a total of 10 blocks), and then adds the correct m/ part to each block:

Sub createWiringData(aWS As Worksheet) Dim Dest As Range, i As Long

'This creates the block of m/nnn values ranging from _ 1/101 in A1 to 10/700 in CV60. These consist of 10 _ blocks of values m/101 to m/700 (m=1,2,..,10) with each _ block containing 60 rows by 10 columns. This is basically _ how the code creates the grid. It creates one block of _ nnn values, duplicates it 9 times (for a total of 10 blocks), _ and then adds the correct m/ part to each block. While _ creating the nnn blocks, the cells must be formatted to _ recognize numbers, whereasile for the latter phase, the cells must _

0 0

Post a comment