Hello,
I am trying to achieve a response from a msgbox which will either continue with the sub or exit. I think my code is right but it doesn't seem to work and just carrys on regardless. Any help would be appreciated.
Private Sub CommandButton1_Click()
Dim MSG1 As Integer
MSG1 = MsgBox("Send Scaffold to destruct?", vbCritical)
If MSG1 = vbCancel Then
Exit Sub
Else
Worksheets("sheet2").Activate
ActiveSheet.Range("b4").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
Worksheets("sheet1").Range("A4:h4").Copy
Worksheets("sheet2").Paste Destination:=ActiveCell.Offset(0, -1)
Worksheets("sheet1").Activate
Worksheets("Sheet1").Rows(4).Delete
End If
End Sub
Bookmarks