PC Review


Reply
Thread Tools Rate Thread

Automatisch beantwoorden vragen

 
 
wietse.uitenbroek@student.hu.nl
Guest
Posts: n/a
 
      16th Mar 2007
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!

 
Reply With Quote
 
 
 
 
wietse.uitenbroek@student.hu.nl
Guest
Posts: n/a
 
      16th Mar 2007
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, wietse.uitenbr...@student.hu.nl 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!



 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      16th Mar 2007
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


"(E-Mail Removed)" 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!
>
>

 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      16th Mar 2007
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

 
Reply With Quote
 
wietse.uitenbroek@student.hu.nl
Guest
Posts: n/a
 
      16th Mar 2007
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
<GarysStud...@discussions.microsoft.com> 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
>
>
>
> "wietse.uitenbr...@student.hu.nl" 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 -



 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      16th Mar 2007
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


"(E-Mail Removed)" 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
> <GarysStud...@discussions.microsoft.com> 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
> >
> >
> >
> > "wietse.uitenbr...@student.hu.nl" 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 -

>
>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      16th Mar 2007
application.cutcopymode = false


(E-Mail Removed) 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
> <GarysStud...@discussions.microsoft.com> 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
> >
> >
> >
> > "wietse.uitenbr...@student.hu.nl" 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 -


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      16th Mar 2007
Thanks Dave - that's good to know.
--
Gary''s Student
gsnuxx


"Dave Peterson" wrote:

> application.cutcopymode = false
>
>
> (E-Mail Removed) 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
> > <GarysStud...@discussions.microsoft.com> 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
> > >
> > >
> > >
> > > "wietse.uitenbr...@student.hu.nl" 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 -

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with IE 6.0, it close automatisch! =?Utf-8?B?UGF0?= Windows XP Internet Explorer 1 25th Jun 2005 12:01 AM
vragen matthijs van bloois Microsoft Access Database Table Design 0 30th May 2005 03:39 PM
Dateien automatisch verschieben Tomas Wieczeslaw Freeware 4 7th Mar 2005 11:42 PM
automatisch opstarten vanuit hibernate staat poeppie42 Windows XP Help 1 30th Nov 2004 03:16 PM
Voor alle vragen over computers; Fonias Computer Hardware 0 9th Jul 2003 09:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:47 PM.