Saving with VBA

  • I am trying to just have this save a file with a given name. I keep getting a "Method 'SaveAs' of object'_Workbook' failed error". If I change ".xlsm" to ".xls" it will save in the right path but as soon as I add the m I get an error. Any thoughts?


  • Re: Saving with VBA


    Place this before the save line:


    Code
    1. MsgBox "\\office\Group11\T&A\Data Specialist\RFT REPORT\Source Reports\" & iyear & "\" & a & "\" & filename


    and ensure that the path looks correct before continuing, also make sure that you actually have permission to save to that drive and that the drive is connected before trying to save.

  • Re: Saving with VBA


    I have done this and the path is correct. I literally just change xlsm to xls and it saves fine. As soon as I add the xlsm is when it fails. i have scoured forums to no avail. I have no idea what would cause this.