Visual Basic for Excel question (closing a window)

  madwab 09:44 08 Jul 2004

I'm trying to close the active window and discard changes. I've only figured out how to close it and be prompted. My VB book says

ActiveWindow.Close ([savechanges])

will save changes, which it does; it then says 'set SaveChanges to False to have changes discarded but doesn't say how. I've tried

ActiveWindow.Close (savechanges = False)
...which opens the save as screen
ActiveWindow.Close ([savechanges = False])
...which opens the save prompt
ActiveWindow.Close ([savechanges] = False)
...which gives an error

...and a couple of other variations. What's the correct format?


  madwab 09:50 08 Jul 2004

(answer below)

ActiveWindow.Close savechanges:=False

  VoG II 09:52 08 Jul 2004

ActiveWindow.Close savechanges := False

  VoG II 09:52 08 Jul 2004


  VoG II 09:52 08 Jul 2004


This thread is now locked and can not be replied to.

Elsewhere on IDG sites

HTC U12 Plus review: Hands-on

Best Android emulators for Mac

TV & Streaming : comment regarder Roland Garros ?