Visual Basic for Excel question (closing a window)

  madwab 09:44 08 Jul 04

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 04

(answer below)

ActiveWindow.Close savechanges:=False

  VoG II 09:52 08 Jul 04

ActiveWindow.Close savechanges := False

  VoG II 09:52 08 Jul 04


  VoG II 09:52 08 Jul 04


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

Intel Coffee Lake 8th-gen Core processors release date rumours

1995-2015: How technology has changed the world in 20 years

Framestore’s haunting post-WWII title sequence for new BBC series SS-GB

How to install MacOS Sierra on an older Mac: Get Sierra running on Macs & MacBooks from before 2009