Home Excel Powerpoint Word Outlook Error Codes

VBA Useful Codes

Welcome to the World of VBA
Home > VBAUsefulCodes

Excel Macro to Create a new Excel workbook file


Use the following Excel VBA code to create a new Excel Workbook and save it in a given path as shown in the below code.

Sub CreateNewExcelWorkbook()
    Dim wb As Workbook
    Set wb = Workbooks.Add
    ' now if you want to save this new workbook
    ' save it by providing the full name of the file
    wb.SaveAs "C:\abc\temp.xlsx"
End Sub

Subscribe

Enter your e-mail below and get notified on the latest blog posts.




Tags

VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts


Follow Us