excel - VBA to ask user if he wants to save the workbook? -
i want users option save workbook (if have made changes) @ beginning of macro. how can achieve this?
i've tried:
thisworkbook.save
but unfortunately doesn't generate prompt.
i've tried:
thisworkbook.save(thisworkbook.fullname)
but asks users if sure want overwrite existing file - gives different prompt 1 want.
just wrap own prompt:
if not thisworkbook.saved if msgbox("do want save file before continuing?",vbyesno,"save?") = vbyes thisworkbook.save end if end if
Comments
Post a Comment