The file is being saved twice and should only save once as a .txt in the directory. Thanks.
' Create new workbooks based on name
Dim sSave As String
Dim sFN As String
Dim Directory As String
Beep
sSave = MsgBox("The data has been formatted and classified. Do you want to save the workbook now?", vbQuestion + vbYesNo)
If sSave = vbYes Then
sFN = [CA1] & "hg19annovar.txt"
Directory = "N:\Torrent\Setup\Clinical\"
ActiveWorkbook.SaveAs Filename:=Directory & sFN, FileFormat:=20
If sFN = "False" Then Exit Sub
ActiveWorkbook.SaveAs Filename:=Directory & sFN, FileFormat:=20
Else
MsgBox "This workbook has not yet been saved!", vbExclamation
End If
Bookmarks