Automate the SaveAs for new workbook

  • Well I'm still stumped on this....I have created multiple new workbooks from a master workbook and now want to automate the "save as" process based on a the cell "B1" in the new workbook.
    Below is my attempt at this but I keep getting the new file saved as "true.xls" any help would be appreciated.

    New Workbook save
    ' Macro recorded 2/7/2003 by zurich6
    ' Keyboard Shortcut: Ctrl+n

    ActiveWorkbook.SaveAs Filename:=Range("B1").Select
    , FileFormat:= _
    xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
    , CreateBackup:=False
    End Sub

  • Hi

    ActiveWorkbook.SaveAs Filename:=Range("B1").Value

    (Range("B1").Select selects cell B1 and returns the result; TRUE if successful, FALSE otherwise)

    Actually you don't need to type Value as this is the default property of the range object.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!