K kalpeshpatel New Member Jul 28, 2012 #1 how to exit excel when i click a button the excel was close any macro
SirJB7 Excel Rōnin Jul 28, 2012 #2 Hi, kalpeshpatel! Do you mean something like? Application.Quit Otherwise please elaborate it a bit more. Thank you. Regards!
Hi, kalpeshpatel! Do you mean something like? Application.Quit Otherwise please elaborate it a bit more. Thank you. Regards!
N nazmul_muneer Member Jul 28, 2012 #3 ActiveWorkbook.Close savechanges = True ' Close without Saving ActiveWorkbook.Close savechanges = False ' Close with Saving
ActiveWorkbook.Close savechanges = True ' Close without Saving ActiveWorkbook.Close savechanges = False ' Close with Saving
G Girish7919 New Member Jul 29, 2012 #4 Can you us in details, exit the macros when they are running when you click close button in excel?
SirJB7 Excel Rōnin Jul 30, 2012 #5 @Girish7919 Hi! Sorry but I don't understand your question. If it's related to the same issue that started this topic, please elaborate a bit more. If it's not related, I'd suggest you to do the same but starting a new topic. Regards!
@Girish7919 Hi! Sorry but I don't understand your question. If it's related to the same issue that started this topic, please elaborate a bit more. If it's not related, I'd suggest you to do the same but starting a new topic. Regards!
sgmpatnaik Active Member Jul 30, 2012 #6 Hello Sir, SirJB7 Good Evening Sir, I Hope your angry is calm down on me Sir here is a code for Command Button but it needs to save the work Book in macro Enable format type the command is Private Sub CommandButton1_Click() If MsgBox("Do you want to quit Excel", vbYesNo) = vbYes Then Application.Quit Else Sheets("Sheet1").Activate End If End Sub I hope this command is help full to Mr. kalpesh Patel With Regards patnaik
Hello Sir, SirJB7 Good Evening Sir, I Hope your angry is calm down on me Sir here is a code for Command Button but it needs to save the work Book in macro Enable format type the command is Private Sub CommandButton1_Click() If MsgBox("Do you want to quit Excel", vbYesNo) = vbYes Then Application.Quit Else Sheets("Sheet1").Activate End If End Sub I hope this command is help full to Mr. kalpesh Patel With Regards patnaik