closing a workbook

methody

Well-known Member
Joined
Jun 17, 2002
Messages
822
Is there a piece of code to use that will close a workbook. I have a command button using 'Activeworkbook.close' but I do not want the mesage box with 'Do you want to save etc' appearing. I want the workbook to close immediately without saving.
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Use

Application.DisplayAlerts = False

before the line that closes the workbook.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,043
Messages
5,526,423
Members
409,701
Latest member
nitmani

This Week's Hot Topics

Top