score:0

Accepted answer

if i have to use your code, try something like this:

option explicit

sub save()

    dim obj_wb as object

    set obj_wb = thisworkbook

    application.displayalerts = false
    activeworkbook.savecopyas filename:=activeworkbook.path & "audit checklist" & ".xlsm"
    msgbox "file saved successfully!", , "save"
    debug.print obj_wb.name
    application.displayalerts = true

    set obj_wb = nothing

end sub

obj_wb is the old file, accessible through this variable. probably it is a good idea to use "thisworkbook" in stead of "activeworkbook". or to refer it always as a variable and not to use any of those at all.


Related Query

More Query from same tag