Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hallo,
Ik vroeg me af of het mogelijk is om automatische msgboxen in Excel zoals: Do you want to save the changes... en dergelijke automatisch te laten beantwoorden. Dus wil automatisch "ja" of "nee" antwoorden. Is het mogelijk en zo ja hoe dien ik dit te doen? Alvast bedankt! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I was wondering if it is possible to automatically answer to msgboxes like "Do you want to save the changes..." So i want to answer this question in the VBA code. Is it possible and if so how? Thanks! On 16 mrt, 13:03, wrote: Hallo, Ik vroeg me af of het mogelijk is om automatische msgboxen in Excel zoals: Do you want to save the changes... en dergelijke automatisch te laten beantwoorden. Dus wil automatisch "ja" of "nee" antwoorden. Is het mogelijk en zo ja hoe dien ik dit te doen? Alvast bedankt! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If your question is:
Prevent or stop the Save Dialog box then put this in ThisWorkbook code: Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Saved = True End Sub If your question is how to automatically save without the Dialog box then put this in ThisWorkbook code: Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Save End Sub -- Gary''s Student gsnu200710 " wrote: Hallo, Ik vroeg me af of het mogelijk is om automatische msgboxen in Excel zoals: Do you want to save the changes... en dergelijke automatisch te laten beantwoorden. Dus wil automatisch "ja" of "nee" antwoorden. Is het mogelijk en zo ja hoe dien ik dit te doen? Alvast bedankt! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Much better.
If the user attempts to close the file or exit Excel, The Workbook_BeforeClose will be activated BEFORE the normal dialog box appears. You can then insert your own logic: 1. if you want to save, just: ActiveWorkbook.Save Exit Sub 2. if you don't want to save: ActiveWorkbook.Saved=True Exit Sub In the second case you are tricking Excel into thinking that workbook has been saved and thus Excel won't botherr to bring up the dialog box. -- Gary''s Student gsnu200710 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the quick answer, the problem is that the msgbox Do you
want to save the changes is answered by the code but after that one on other msgbox appears that says that "There is a large amount of information on the Clipboard......To save...click Yes" This question should also be answered automatiacally with Yes can you help me with that? On 16 mrt, 13:25, Gary''s Student wrote: If your question is: Prevent or stop the Save Dialog box then put this in ThisWorkbook code: Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Saved = True End Sub If your question is how to automatically save without the Dialog box then put this in ThisWorkbook code: Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Save End Sub -- Gary''s Student gsnu200710 " wrote: Hallo, Ik vroeg me af of het mogelijk is om automatische msgboxen in Excel zoals: Do you want to save the changes... en dergelijke automatisch te laten beantwoorden. Dus wil automatisch "ja" of "nee" antwoorden. Is het mogelijk en zo ja hoe dien ik dit te doen? Alvast bedankt!- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try:
Application.DisplayAlerts = False before the Exit I don't know if it will work because I can't test it. -- Gary''s Student gsnu200710 " wrote: Thanks for the quick answer, the problem is that the msgbox Do you want to save the changes is answered by the code but after that one on other msgbox appears that says that "There is a large amount of information on the Clipboard......To save...click Yes" This question should also be answered automatiacally with Yes can you help me with that? On 16 mrt, 13:25, Gary''s Student wrote: If your question is: Prevent or stop the Save Dialog box then put this in ThisWorkbook code: Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Saved = True End Sub If your question is how to automatically save without the Dialog box then put this in ThisWorkbook code: Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Save End Sub -- Gary''s Student gsnu200710 " wrote: Hallo, Ik vroeg me af of het mogelijk is om automatische msgboxen in Excel zoals: Do you want to save the changes... en dergelijke automatisch te laten beantwoorden. Dus wil automatisch "ja" of "nee" antwoorden. Is het mogelijk en zo ja hoe dien ik dit te doen? Alvast bedankt!- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatisch Eingaben mit weiteren Arbeitsblätter verknüpfen | Excel Discussion (Misc queries) |