Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9048695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:13:07+00:00 2026-06-16T12:13:07+00:00

Hi I wrote some code using VBScript on Excel sheet as below. Now everytime

  • 0

Hi I wrote some code using VBScript on Excel sheet as below. Now everytime when the Script is done its processing it is prompting the user to Save it.But I don’t want this,rather I want it to save it automatically without prompt.

CODE

    Option Explicit

    Dim objExcel1,strPathExcel1,objSheet1,objSheet5

    Set objExcel1 = CreateObject("Excel.Application")'Object for Condition Dump
    strPathExcel1 = "D:\VA\GE_Wing_To_Wing_Report.xlsx"
    objExcel1.Workbooks.Open strPathExcel1
    Set objSheet1 = objExcel1.ActiveWorkbook.Worksheets(1)
    Set objSheet5 = objExcel1.ActiveWorkbook.Worksheets(5)

    '=====================================================================================
    'Here Bad sheet will be copied by the data from First sheet master data sheet
    '=====================================================================================
       ParentPIDFromMasterSheet objSheet1,objSheet5

    '=====================================================================================
    'Here Bad sheet will be copied by the data from First sheet master data sheet
    '=====================================================================================
       BadDataSelectionDel objSheet5

    '=======================
    objExcel1.ActiveWorkbook.SaveAs strPathExcel1
    objExcel1.Workbooks.close
    objExcel1.Application.Quit
    '======================
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T12:13:09+00:00Added an answer on June 16, 2026 at 12:13 pm

    UNTESTED (Try this)

    You need to set your workbook and then close it after saving it. Also it is a good practice to clean up your objects at the end of your code after use. 🙂

    Option Explicit
    
    Dim objExcel1, objWB, strPathExcel1, objSheet1, objSheet5
    
    Set objExcel1 = CreateObject("Excel.Application") 'Object for Condition Dump
    strPathExcel1 = "D:\VA\GE_Wing_To_Wing_Report.xlsx"
    Set objWB = objExcel1.Workbooks.Open(strPathExcel1)
    Set objSheet1 = objWB.Worksheets(1)
    Set objSheet5 = objWB.Worksheets(5)
    
    '=====================================================================================
    'Here Bad sheet will be copied by the data from First sheet master data sheet
    '=====================================================================================
       ParentPIDFromMasterSheet objSheet1, objSheet5
    
    '=====================================================================================
    'Here Bad sheet will be copied by the data from First sheet master data sheet
    '=====================================================================================
       BadDataSelectionDel objSheet5
    
    '=======================
    objWB.Save
    objWB.Close
    objExcel1.Quit
    
    '~~> Cleanup
    Set objSheet1 = Nothing
    Set objSheet5 = Nothing
    Set objWB = Nothing
    Set objExcel1 = Nothing
    '======================
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote some code to send an email from my PHP script using PHPMailer.
I'm very new to C#. My boss asked me to wrote some code using
I wrote some code which monitors the output of Stopwatch using a tight loop.
I wrote a simple plugin which sets some css code using wp_options. It all
I'm trying to access some C code via Python using ctypes, so I wrote
I wrote some code in c, using pthread (I configured the linker and compiler
I wrote some code to select duplicates and group them using first and last
I want to break a sentence into words using pointers. I wrote some code
I wrote some code using Regular Expressions: using System; using System.Collections.Generic; using System.Linq; using
A co-worker wrote some code using the Net:HTTP class from the net/https module. He

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.