Results 1 to 2 of 2

Thread: Delete Excel Sheets from VB

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    45
    I'm using following syntax to delete an Excel sheet from within VB.

    obExcelProg.Sheets(3).Delete


    But before the sheet is removed a messagebox appear asking the user to hit OK to delete the sheet or cancel to ignore the process.

    What can I do to not display the message to the user?


  2. #2

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    45

    Solution

    I were too fast asking you guys for help.
    This question were already asked and answered.
    Here is what I ended up doing:

    obExcelProg.DisplayAlerts = False
    obExcelProg.Sheets(3).Delete
    obExcelProg.DisplayAlerts = True

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