AllExperts > VB Script 
Search      
VB Script
Volunteer
Answers to thousands of questions
 Home · More VB Script Questions · Answer Library  · Encyclopedia ·
More VB Script Answers
Question Library

Ask a question about VB Script
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Miguel Zapico
Expertise
I can answer question about how to use scripts to consolidate data, connect different systems and automate tasks. I have no experience on using VBScript on web programming.

Experience
I have been using VBScript and Windows Scripting Host as my swiss tool for the last 6 years.

Organizations
New York PC users group (NYPC)
Independant Computer Consultants Association (ICCA)

Education/Credentials
Microsoft MCSE in Windows NT

 
   

You are here:  Experts > Computing/Technology > Basic > VB Script > Delete and Add new Excel Sheet using Vb script

VB Script - Delete and Add new Excel Sheet using Vb script


Expert: Miguel Zapico - 9/6/2006

Question
Hi

I have Created a Generic Application in Excel using VB Script.In this App I am Browsing the Excel File and Displaying all sheets in a List Box
And adding them to a new List Box.I am activating a sheet by clicking an Activate button.The Problem I have is I am not able to Delete and add a Excel Sheet to the Excel App on click of a Button by calling the Methods.
Plz help me in this matter.
Thanks in Advance.

Answer
The Delete method of the Worksheet object in Excel shows a dialog box by default, you may have some issues if you are operating with the Excel application not visible.  You can avoid it by setting the DisplayAlerts property of the Excel application object to False.
Regarding the Add method, it is applied on the Worksheets collection, and it usually works, as it doesn't need any additional parameters.  If you can be more specific on the error messages that you are getting I may be able to be more precise.

Hope this helps,
Miguel.

View Follow-Ups    Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.