sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
When I run this piece- the msgbox response doesn't seem to matter- it to delete the sheet and then create a new one whether I hit 'yes, 'no' or cancel.
Note: the VoyageSpecificsCreate is a HUGE formatting piece- just for the application pieces there.
Note: the VoyageSpecificsCreate is a HUGE formatting piece- just for the application pieces there.
Code:
Sub VoyageSpecifics()' VoyageSpecifics Macro
' This controls a page that has all of the Voyage Specifics saved on it
'Speeds up the formating part
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Application.ScreenUpdating = False
'Error Checks for a Voyage Specifics Sheet already existing
If SheetExists("Voyage Specifics") Then
MsgBox "Voyage Specifics Sheet already exists, would you like to delete it and start over?", vbYesNoCancel
If vbYes Then
Sheets("Voyage Specifics").Delete
Call VoyageSpecificsCreate
ElseIf vbNo Then
Sheets("VoyageSpecifics").Select
Exit Sub
End If
Else: Call VoyageSpecificsCreate
End If
'Speeds up the formating part
Application.DisplayAlerts = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub