Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50061

VBA to save as macro free workbook?

$
0
0
Hello,

Does anyone have suggestions on how to overwrite/not prompt for the macro-free workbook message:

the following features cannot be saved in macro-free workbooks:
*vb project
To continue saving as macro-free workbook, click Yes.

Open Macro
Code:

Private Sub Workbook_Open()Run "update_rpt"
End Sub

Update_Macro
Code:

Sub update_rpt()Dte = Weekday(Date)
 Select Case Dte
 Case Is = 3, 4, 5, 6, 7
 Dte = Date - 1
 Case Is = 1 'Sun
 Dte = Date - 2
 Case Is = 2 'Mon
 Dte = Date - 3
 End Select
 FDte = Format(Dte, "yyyy_mm_dd")
'
' update_rpt Macro
'


ChDir "\\ezfp1\Results\InReview\"
    ActiveWorkbook.SaveAs Filename:= _
        "\\ezfp1\Results\InReview\AML_" & FDte & ".xls", FileFormat:= _
        xlOpenXMLWorkbook, CreateBackup:=False


End Sub

Exit Macro
Code:

Sub Exit_Excel()Application.Quit
End Sub


Viewing all articles
Browse latest Browse all 50061

Trending Articles