When using an input box, If the user hits the cancel button instead of leaving what is currently in the cell, it clears it. Is there anyway around that?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If barcode = "on" Then
If Selection = Range("d8"
Then
Range("d8"
.Value = (InputBox("Scan or Type Assembly Part Number", "NORTECH SYSTEMS INC.", " "
)
Range("al8"
.Value = (InputBox("Scan or Type Sequence Number", "NORTECH SYSTEMS INC."
)
Range("f8"
.Formula = "=IF(ISBLANK(al8)=TRUE,TRIM(CHAR(32)),MID(al8,3,6))"
Range("g8"
.Formula = "=IF(ISBLANK(al8)=TRUE,TRIM(CHAR(32)),MID(al8,16,2))"
End If
End If
End If
End Sub
Also with this code, if they hit cancel everytime anyother cell is clicked it will popup that input box till something is entered.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If barcode = "on" Then
If Selection = Range("d8"
Range("d8"
Range("al8"
Range("f8"
Range("g8"
End If
End If
End If
End Sub
Also with this code, if they hit cancel everytime anyother cell is clicked it will popup that input box till something is entered.