I have looked at this over and over and can't figure it out. Below is a code that adds a row below the active row. This was working fine until I added more columns to it. My Range went from B to S, to B to V. It get's far as selecting the range, but won't pop the msgBox up, it just stalls. Again it works finr if I take out the columns I added. Any suggestions would be much appreciated.
Private Sub CommandButton1_Click() Dim AddRow As Long UserForm1.Hide AddRow = ActiveCell.Row Range("B" & AddRow, "V" & AddRow).Select If MsgBox("Are you sure you want to Add a new line?", vbOKCancel, "Add line?") = vbCancel Then GoTo Canc3: Selection.Insert Shift:=xlDown Range("C" & AddRow + 1, "V" & AddRow + 1).Copy Range("C" & AddRow, "V" & AddRow) Selection.Borders(xlEdgeBottom).LineStyle = xlNone Range("B" & AddRow - 1).Copy Range("B" & AddRow) Canc3: End Sub
Edit: Just to add info, it does not give me an error, it just acts like it is done, and the range is highlighted, but no msgBox and no added row. Same issue with deleting a row.