Code:
Sub ProcessBOM()
Dim Boards As Long
Dim Cancel As Boolean
Sheets("DK").Select
Range("Boards").value = Application.InputBox _
(Prompt:="How many boards are to be assembled?", _
Title:="Number of Boards", _
Type:=1)
Cancel = Range("Boards").value
If Cancel = False Then
MsgBox "The Cancel button was pressed, exiting"
Exit Sub
Else
Call CopyFormulas
Call Copy
Call DeleteBlankRows
Call DeleteNoDK
Call dkpn
Call CleanUp
Call StockCheck
Call Total
Sheets("BOM").Activate
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=Range("A260").value
Application.DisplayAlerts = True
MsgBox "The BOM processing has completed and the file has been saved"
End If
End Sub