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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:36:40+00:00 2026-05-11T06:36:40+00:00

As I understand it when I create an Excel sheet with VBA code the

  • 0

As I understand it when I create an Excel sheet with VBA code the VBA code is saved as binary with the sheet. I therefore can’t put the code into source control in a useful way, have multiple devs working on the problems, diffing is difficult, etc.

Is there a way round this without switching to VSTO, COM addins etc? E.g. for the sheet to load all is VBA in at runtime from a web service, shared drive, etc? Any ideas appreciated.

Thanks.

  • 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-11T06:36:41+00:00Added an answer on May 11, 2026 at 6:36 am

    I wrote a kind of build system for Excel which imports the VBA code from source files (which can then be imported into source control, diffed, etc.). It works by creating a new Excel file which contains the imported code, so it might not work in your case.

    The build macro looks like this, I save it in a file called Build.xls:

    Sub Build()     Dim path As String     path = 'excelfiles'      Dim vbaProject As VBIDE.VBProject     Set vbaProject = ThisWorkbook.VBProject      ChDir 'C:\Excel'     ' Below are the files that are imported     vbaProject.VBComponents.Import (path & '\something.frm')     vbaProject.VBComponents.Import (path & '\somethingelse.frm')      Application.DisplayAlerts = False     ActiveWorkbook.SaveAs 'Output.xls'     Application.DisplayAlerts = True      Application.Quit End Sub 

    Now, the VBIDE stuff means you have to import a reference called “Microsoft Visual Basic for Applications Extensibility 5.3′, I think.

    Of course you still have the problem with having to start Excel to build. This can be fixed with a small VB script:

    currentPath = CreateObject('Scripting.FileSystemObject') _     .GetAbsolutePathName('.') filePath = currentPath & '\' & 'Build.xls'  Dim objXL Set objXL = CreateObject('Excel.Application') With objXL     .Workbooks.Open(filePath)     .Application.Run 'Build.Build' End With Set objXL = Nothing 

    Running the above script should start the build Excel file which outputs the resulting sheet. You problably have to change some things to make it movable in the file system. Hope this helps!

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

Sidebar

Ask A Question

Stats

  • Questions 76k
  • Answers 76k
  • 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
  • added an answer The combobox has an ItemStringFormat property that dictates how items… May 11, 2026 at 3:10 pm
  • added an answer Decrease your number of round trips 1000 round trips for… May 11, 2026 at 3:10 pm
  • added an answer If the node is null or empty, what is s?… May 11, 2026 at 3:10 pm

Related Questions

I need some mind reading here, since I am trying to do what I
I am trying to place an action to happen after an entire .aspx page
I've just wasted the past two hours of my life trying to create a
I have the following code: $bind = new COM(LDAP://CN=GroupName,OU=Groups,OU=Division,DC=company,DC=local); When I execute it from

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.