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

Popular posts from this blog

ruby on rails - Is it the correct way to implement belongs_to relation with factory girl? -

geolocation - Windows Phone 8 - Keeping background location tracking active beyond four hours -

Uncaught TypeError: Cannot read property 'parentNode' of null javascript -