This one has me banging my head against the wall cause I see no point why it does this. The following macro is used in my Copier Repair Center where I keep an inventory of Copiers that I repair. This macro is to remove a copier from the inventory and for some dang(I really want to use stronger language but I will refrain) whenever it gets to the point where it deletes the entire row it suddenly jumps to a completely different macro. It is the same macro every time but I don't see any reason why it would do this... Someone assist me please before I have a serious concussion. I have tried activating the cell underneath and having it erase the row just above it but that hasn't worked either. Here's the code with brief explanations.
![]()
*** Starts on the Copier Inventory Control Page ***
Sub Copier_Remove()
Range("D17").Select
Mdl = ActiveCell.Text *** Obtains Model ***
Range("G17").Select
Srl = ActiveCell.Text *** Obtains Serial Number ***
Chck = MsgBox("WARNING! This will remove the " & Mdl & " copier with serial number " & Srl & " from your inventory, do you wish to continue?", vbOKCancel)
If Chck = vbOK Then
Sheets("Copier Inventory").Select
Application.Range("B1").Select
Else
Exit Sub
End If
Line2:
Do
ActiveCell.Offset(1, 0).Select
If ActiveCell.Value = "" Then GoTo Line1
Loop Until ActiveCell.Value = Srl
If ActiveCell.Offset(0, -1).Value = Mdl Then *** Double Checks that Model and Serial Match ***
ActiveCell.EntireRow.Delete *** This is where it completely jumps to another Macro ***
Sheets("Copier Inventory Main").Select
A = MsgBox("The " & Mdl & " copier with serial number " & Srl & " has been deleted from your inventory.", vbInformation)
Exit Sub
Else
A = MsgBox("The Model and Serial number did not match in my search. I will now double check the results.", vbCritical)
GoTo Line2
End If
Line1:
Sheets("Copier Inventory Main").Select
B = MsgBox("Was unable to locate proper serial number and model match. Please check your inventory to ensure it is correct.", vbCritical)
End Sub
Bookmarks