Results 1 to 3 of 3

Thread: Excel Application Sheet Deletion *RESOLVED*

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    India
    Posts
    134

    Wink Excel Application Sheet Deletion *RESOLVED*

    Hi all,

    I'm calling excel from VB and trying to post data into it. I've been sucessfule in that.
    however, I need to delete all empty sheets in excel. and only one sheet viz., into which i've to post the data should be remaining in the work book. I've incorporated the code to delete sheets however, when the statement is being exceuted delete confiramtion dialog pops up. I would like to know how to supress the delete confirmation dialog.

    Thanx
    Last edited by pavan; Sep 19th, 2003 at 01:49 AM.
    Pavan Kumar

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    Replace "xlApp" with your reference to the Excel application
    VB Code:
    1. xlApp.DisplayAlerts = False
    2. < delete code >
    3. xlApp.DisplayAlerts = True

    If you don't turn on DisplayAlerts afterwards you will find Excel does everything without asking when you run it manually too (which really isn't nice!)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    India
    Posts
    134
    Originally posted by si_the_geek
    Replace "xlApp" with your reference to the Excel application
    VB Code:
    1. xlApp.DisplayAlerts = False
    2. < delete code >
    3. xlApp.DisplayAlerts = True

    If you don't turn on DisplayAlerts afterwards you will find Excel does everything without asking when you run it manually too (which really isn't nice!)

    Thanks for the Help
    Pavan Kumar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width