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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:30:38+00:00 2026-05-10T15:30:38+00:00

I’m trying to create a build script for my current project, which includes an

  • 0

I’m trying to create a build script for my current project, which includes an Excel Add-in. The Add-in contains a VBProject with a file modGlobal with a variable version_Number. This number needs to be changed for every build. The exact steps:

  1. Open XLA document with Excel.
  2. Switch to VBEditor mode. (Alt+F11)
  3. Open VBProject, entering a password.
  4. Open modGlobal file.
  5. Change variable’s default value to the current date.
  6. Close & save the project.

I’m at a loss for how to automate the process. The best I can come up with is an excel macro or Auto-IT script. I could also write a custom MSBuild task, but that might get… tricky. Does anyone else have any other suggestions?

  • 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. 2026-05-10T15:30:38+00:00Added an answer on May 10, 2026 at 3:30 pm

    An alternative way of handling versioning of an XLA file is to use a custom property in Document Properties. You can access and manipulate using COM as described here: http://support.microsoft.com/?kbid=224351.

    Advantages of this are:

    • You can examine the version number without opening the XLA file

    • You don’t need Excel on your build machine – only the DsoFile.dll component

    Another alternative would be to store the version number (possibly other configuration data too) on a worksheet in the XLA file. The worksheet would not be visible to users of the XLA. One technique I have used in the past is to store the add-in as an XLS file in source control, then as part of the build process (e.g. in a Post-Build event) run the script below to convert it to an XLA in the output directory. This script could be easily extended to update a version number in a worksheet before saving. In my case I did this because my Excel Add-in used VSTO, and Visual Studio doesn’t support XLA files directly.

    ' '   ConvertToXla.vbs ' '   VBScript to convert an Excel spreadsheet (.xls) into an Excel Add-In (.xla) ' '   The script takes two arguments: ' '   - the name of the input XLS file. ' '   - the name of the output XLA file. ' Option Explicit Dim nResult On Error Resume Next nResult = DoAction If Err.Number <> 0 Then      Wscript.Echo Err.Description     Wscript.Quit 1 End If Wscript.Quit nResult  Private Function DoAction()      Dim sInputFile, sOutputFile      Dim argNum, argCount: argCount = Wscript.Arguments.Count      If argCount < 2 Then         Err.Raise 1, 'ConvertToXla.vbs', 'Missing argument'     End If      sInputFile = WScript.Arguments(0)     sOutputFile = WScript.Arguments(1)      Dim xlApplication      Set xlApplication = WScript.CreateObject('Excel.Application')     On Error Resume Next      ConvertFileToXla xlApplication, sInputFile, sOutputFile     If Err.Number <> 0 Then          Dim nErrNumber         Dim sErrSource         Dim sErrDescription         nErrNumber = Err.Number         sErrSource = Err.Source         sErrDescription = Err.Description         xlApplication.Quit         Err.Raise nErrNumber, sErrSource, sErrDescription     Else         xlApplication.Quit     End If  End Function  Public Sub ConvertFileToXla(xlApplication, sInputFile, sOutputFile)      Dim xlAddIn     xlAddIn = 18 ' XlFileFormat.xlAddIn      Dim w     Set w = xlApplication.Workbooks.Open(sInputFile,,,,,,,,,True)     w.IsAddIn = True     w.SaveAs sOutputFile, xlAddIn     w.Close False End Sub 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 158k
  • Answers 158k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer @newbie, but a response, is to tidy the code and… May 12, 2026 at 11:20 am
  • Editorial Team
    Editorial Team added an answer Every single running application has a parent application, which launched… May 12, 2026 at 11:20 am
  • Editorial Team
    Editorial Team added an answer No, you need to use frames. You need to have… May 12, 2026 at 11:20 am

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.