I have a program that opens an existing workbook, adds a date to the name and saves it as a new file. The code says to save it as a .xlsm file type but it ends up as a .xl01 or a .xl04 or a .xl010 file type. Excel does not recognize this file type when attempting to open in explorer. I cannot find any information on this file type. Please assist!
Code:
Sub Check_File()
Dim File As String, DirFile As String
File = "Event and Conference Points Table " & Format(ActiveCell, "yyyy-mm-dd" & ".xlsm")
DirFile = "C:\Users\Jeff\LH Points\"
If Dir(DirFile & File) = "" Then
Workbooks.Open FileName:=DirFile & "Event and Conference Points Table Template.xlsm"
ActiveWorkbook.SaveAs FileName:=DirFile & File
Else
Workbooks.Open FileName:=DirFile & File
End If
End Sub
Private Sub CommandButton1_Click() 'changes dates back 28 days
Range("A3").Value = Range("G1")
End Sub
Private Sub CommandButton2_Click() 'changes dates forward 28 days
Range("A3").Value = Range("H1")
End Sub
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Call Check_File
End Sub