Hello Geoff,
In your code the variable EX is a string. If I understand what your are trying to do, you want the first 2 letters of the value stored in the Named Range "ExIncOp" to the file title. The changes are in blue.
Private Sub SaveFile_Click()
'
' SaveFile Macro
'
Dim Dt As Date
Dim Ex As String
Dt = Range("StartDate").Value
Ex = Left(Range("ExIncOp").Text, 2)
If IsEmpty(Worksheets("Operation").Range("ExIncOp")) Then
Msg = MsgBox("Please enter TYPE in cell C6 to continue ", vbOKOnly)
End If
If IsEmpty(Worksheets("Operation").Range("Name")) Then
Msg = MsgBox("Please enter NAME in cell H6 to continue ", vbOKOnly)
End If
If IsEmpty(Worksheets("Operation").Range("StartDate")) Then
Msg = MsgBox("Please enter DATE FROM in cell E10 to continue", vbOKOnly)
Exit Sub
End If
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & Range _
("Debrief_Folder").Value & "\" & EX & " " & Range("Name"). _
Value & " " & Format(Dt, "dd-mm-yy") & ".xls", FileFormat:=xlNormal
End Sub
Sincerely,
Leith Ross
Bookmarks