AnsweredAssumed Answered

vrf How to disable this error/requester (on Excel)?

Question asked by fukui.yutaka on Mar 19, 2004
Hi,


Step1. Set property of the "Application.DisplayAlerts" to False.

Step2. Delete a Sheet.

Step3. Set property of the "Application.DisplayAlerts" to True.


The follwing Excel's Macro will work.

Sub Macro()

Application.DisplayAlerts = False
Sheets("Sheet1").Delete
Application.DisplayAlerts = True

End Sub


Regards,


tapio.ronkainen@nokia.com wrote:
>
> Hello and sorry that I post a Excel question here, but since many of us here use the Excel, perhaps you might have an idea. The Vee is doing 99.9 % of the work in this test, but Excel seems to do equally hard work on generating problems...
>
> The problem is that I need to delete unwanted sheets from my report template (depending test case) automatically. I use the Sheets("Sheet1").delete for this. And the Excel of course gives the "Selected sheet will be permanently deleted..." etc. warning. To disable this requester to pop up, I used the most easiest way. I issue the "On Error Goto 0" command before this delete command, but...
>
> The requester still pop's up.
>
> Since the "On Error Goto 0" works with other cases, like saving on top of the existing file etc. cases there might be something different here.
>
> Easy way to illuminate the problem is to type in the following in Excel's VBA.
>
> Sub Macro()
>
> On Error Goto 0
> Sheets("Sheet1").Delete
>
> End Sub
>
> All help is really welcome, I outta my Excel wisdom (not much of it, but...) here.
>
> Thanks, Tapio
>
> ---
> You are currently subscribed to vrf as: fukui.yutaka@jp.fujitsu.com
> To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
> To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list,  email "vrf@agilent.com".
> If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

--
*****************************************************************
*  $BJ!0f!!K-!J (BFUKUI Yutaka)
* E-Mail: fukui.yutaka@jp.fujitsu.com
*  $BIY;NDL3t<02q<R!!@n:j9)>l (B
*  $B$b$N$E$/$j?d?JKIt!&@8;:5;=Q3+H/E}3gIt!K7WB,@_Hw3+H/It (B
*  $B7WB,@_Hw3+H/It (BHomePage http://www.psl.fujitsu.co.jp/htd2/ksk/
*  $B@n:j;TCf866h>e>.EDCf#4 (B- $B#1 (B- $B#1!!M9JXHV9f!' (B211-8588
* TEL  $B!!30@~ (B 044-754-3657, $B!!Fb@~ (B 711-3-1966,7
* FAX  $B!!30@~ (B 044-754-3509, $B!!Fb@~ (B 711-3-5359
*****************************************************************

---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes