Thanks to RoyUK yesterday I now have three cells checked to make sure data is in them and then the code is meant to save the file with some of the data from those three cells. The checks work but now the save part doesn't! If I comment out two of the checks the save does work.
Any ideas please
Linked to http://www.excelforum.com/showthread.php?t=625320
Private Sub SaveFile_Click()
'
' SaveFile Macro
'
Dim Dt As Date
Dim Ex As String
Dt = Range("StartDate").Value
Ex = Left(ExIncOp, 2)
'
If IsEmpty(Worksheets("Operation").Range("ExIncOp")) Then
Msg = MsgBox("Please enter TYPE in cell C6 to continue ", vbOKOnly)
If IsEmpty(Worksheets("Operation").Range("Name")) Then
Msg = MsgBox("Please enter NAME in cell H6 to continue ", vbOKOnly)
If IsEmpty(Worksheets("Operation").Range("StartDate")) Then
Msg = MsgBox("Please enter DATE in cell E10 to continue", vbOKOnly)
Exit Sub
Else: ActiveWorkbook.SaveAs Filename:= _
"MyPath\" & "Ex" & " " & Range("Name").Value _
& " " & Format(Dt, "dd-mmm-yy") & ".xls", FileFormat:=xlNormal
End If
End If
End If
End Sub
Bookmarks