Whats wrong with my code 
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))"
ElseIf Selection = Range("d9"
Then
Range("d9"
.Value = (InputBox("Scan or Type Assembly Part Number", "NORTECH SYSTEMS INC.", " "
)
Range("al9"
.Value = (InputBox("Scan or Type Sequence Number", "NORTECH SYSTEMS INC."
)
Range("f9"
.Formula = "=IF(ISBLANK(al9)=TRUE,TRIM(CHAR(32)),MID(al9,3,6))"
Range("g9"
.Formula = "=IF(ISBLANK(al9)=TRUE,TRIM(CHAR(32)),MID(al9,16,2))"
ElseIf Selection = Range("d10"
Then
Range("d10"
.Value = (InputBox("Scan or Type Assembly Part Number", "NORTECH SYSTEMS INC.", " "
)
Range("al10"
.Value = (InputBox("Scan or Type Sequence Number", "NORTECH SYSTEMS INC."
)
Range("f10"
.Formula = "=IF(ISBLANK(al10)=TRUE,TRIM(CHAR(32)),MID(al10,3,6))"
Range("g10"
.Formula = "=IF(ISBLANK(al10)=TRUE,TRIM(CHAR(32)),MID(al10,16,2))"
........etc......
End If
End If
End If
End Sub
No matter what i click on the input box pops up in order of the code. For ex. If i click on f10(or anything) the input box for d8 will popup, then if i click on g17(anything) next the input box for d9 will popup, and so on and so forth. If you have any suggestions that would be very cool. Thanx
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"
ElseIf Selection = Range("d9"
Range("d9"
Range("al9"
Range("f9"
Range("g9"
ElseIf Selection = Range("d10"
Range("d10"
Range("al10"
Range("f10"
Range("g10"
........etc......
End If
End If
End If
End Sub
No matter what i click on the input box pops up in order of the code. For ex. If i click on f10(or anything) the input box for d8 will popup, then if i click on g17(anything) next the input box for d9 will popup, and so on and so forth. If you have any suggestions that would be very cool. Thanx