I have some simple code that is causing me to pull out my hair.
All it does is check to see if the value in cell "AK" & i (i being equeal to the active cell row, =1. This part is working, if the value is = to 1 then the msg box pops up, allowing me to choose, Yes or No. I have told it if
vbYes then put the text "yes" in a cell. The problem is that if, I click yes, it does nothing, and yes or no msg box will not go away. If I click no, then it puts "yes" in the cell I requested and the msg box goes away. I can click the Yes button forever, but it will not go away. It is like it is stuck in a loop or something. Any help would be appreciated. I have also tried putting different values into the cell, ex: other text or numbers.
Thanks
Private Sub Worksheet_Change(ByVal Target As Range)
i = ActiveCell.Row
If Range("AK" & i) = 1 Then
Dim myLabel
myLabel = MsgBox("Do you need a BARCODE LABEL", vbYesNo)
If myLabel = vbYes Then
Range("AL" & i) = "yes"
End If
End If
End Sub
All it does is check to see if the value in cell "AK" & i (i being equeal to the active cell row, =1. This part is working, if the value is = to 1 then the msg box pops up, allowing me to choose, Yes or No. I have told it if
vbYes then put the text "yes" in a cell. The problem is that if, I click yes, it does nothing, and yes or no msg box will not go away. If I click no, then it puts "yes" in the cell I requested and the msg box goes away. I can click the Yes button forever, but it will not go away. It is like it is stuck in a loop or something. Any help would be appreciated. I have also tried putting different values into the cell, ex: other text or numbers.
Thanks
Private Sub Worksheet_Change(ByVal Target As Range)
i = ActiveCell.Row
If Range("AK" & i) = 1 Then
Dim myLabel
myLabel = MsgBox("Do you need a BARCODE LABEL", vbYesNo)
If myLabel = vbYes Then
Range("AL" & i) = "yes"
End If
End If
End Sub