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 8298711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:53:07+00:00 2026-06-08T15:53:07+00:00

I have hundreds of excel files that need to be extended with code and

  • 0

I have hundreds of excel files that need to be extended with code and new sheets. When I add the code first, it saves correctly. Unfortunately the code contains references to the sheets that needs to be added. So I have to add the sheet before… But then the problem occurs, that the added code is not saved within the workbook. Even if added the sheet manually… I’m not able to add code in any way.

  • 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-08T15:53:08+00:00Added an answer on June 8, 2026 at 3:53 pm

    The problem was solved when I used SaveAs instead of Save and provided the file format:

    workbook.SaveAs (filename, XlFileFormat.xlOpenXMLWorkbookMacroEnabled);
    

    The excel file extension doesn’t matter. Worked for me 🙂

    Edit:

    Also the file extension must match file format. For instance, files saved with XlFileFormat.xlOpenXMLWorkbookMacroEnabled must be saved with the xlsm extension. Otherwise, every time on opening the file, a alert message will appear.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have hundreds of .doc files with text that I need put on web
I have a macro that add hundreds of lines of data to an excel
i have hundreds of [mostly different] files in many different directories that all have
I have an excel spread sheet (well, hundreds of them) which I need importing
I have created an Excel 2003 add-in that uses the CLR 2.0 and this
I have a Microsoft Excel worksheet that has hundreds of rows of items. The
I have an application that can potentially have hundreds of memory mapped, i.e., mmap()
Just trying to write my first ever WP7 app. I have several hundreds of
I have a function that's called hundreds of thousands of times per update, and
I have a link that opens up JSON data in the browser, but unfortunately

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.