Pass Key Components Completed

There is the one final support function to code: the one used by addAConnection and deleteAConnection to reset a cell to an unused state: resetValue restores the default wiring code and the color index for a given cell.

Sub resetValue(Target As Range)

Application.EnableEvents = False On Error GoTo ErrHandler With Target

.Value = XLtoWiringCoords(.Row, .Column) .Font.Colorlndex = cUnusedColorldx End With

Application.EnableEvents = True Exit Sub ErrHandler:

MsgBox "Unexpected error in resetValue: Target=" _ & Target.Address & vbNewLine _

& "Error=" & Err.Description & " (" & Err.Number & ")" Application.EnableEvents = True End Sub

0 0

Post a comment