Hi All,
I have this code which I need to add a message box if a cell is blank. I've managed to do this but the macro should stop if the cell is blank which I can't figure out:
I suspect the purple line is missing something before or after it, any ideas?
I have this code which I need to add a message box if a cell is blank. I've managed to do this but the macro should stop if the cell is blank which I can't figure out:
Code:
Sub Order()
'
' Paste Macro
'
Application.ScreenUpdating = False
If IsEmpty(ThisWorkbook.Sheets(1).Range("D10")) Then
MsgBox ("Please Enter the Study Number or General if not study specific")
Cancel = True
[COLOR=magenta]End If
[/COLOR]'Enter User
Sheets("Ordering Sheet").Range("G23").Value = Application.UserName
'Paste Data
Sheets("Ordering Sheet").Range("A23:P23").Copy
Sheets("Orders").Range("A50000").End(xlUp).Offset(1).PasteSpecial Paste:=xlValues
'Clear Clipboard
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
I suspect the purple line is missing something before or after it, any ideas?