How to create a Installation file for a VBA project

How can we create an Install File like in VB6 ("Package & Deployment Wizard") but for VBA?

Current VBA version is 6.5
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
VBA is application dependent - that is, you cannot have a standalone "VBA Project" ... it must be tied into another application, like Word or Access.

Depending on what you're doing, you can often simply copy/paste an Access database. If you need a more professional installation tool, you might consider Advanced Installer ( - they have a free version) or the Sage Installation system (
rayluvsAuthor Commented:

I understand VBA is tied to another application, i.e, Access, Word, Excel, etc., but before download and testing links given, can they produce an Install or setup of a VBA project?

This is what whats happening right now.  We are developing in VBA for Microsoft Great Plains (I assume that all VBA behave the same, correct me if I'm wrong).  We have finished the project and its a lot of code.  There are over 10 workstation and what we want is to install the VBA code developed via a setup programs, instead of importing, adding the references, configuring, etc.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I'm not familiar with Great Plains and the process, but apparently there is something called "Customization Maintenance" where you can determine what to "package", then export that ... then move it to the client machine and Import it into the client's Great Plains program.

Perhaps this will help:

Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

rayluvsAuthor Commented:
We're familiar with the link provided and "Customization Maintenance".  Unfortunately, we haven't been able to find anything to deploy VBA.

Question:  in your experience, what application with VBA permits to package and created setup files? Can that be done?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I'm not sure. I deal primarily with Access, which doesn't allow producing standalone VBA projects. Perhaps you should ask this in the Great Plains zone:

Use the Request Attention link above to ask the mods to move/add that TA.
rayluvsAuthor Commented:
rayluvsAuthor Commented:
One last question, do you know a any VBA apps that does permit to create an Install/Setup for deploying VBA programs?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
No. I've never seen one that could create VBA apps.
rayluvsAuthor Commented:
Ok Thanx.  Lets see what the MOD says.
I suggest, that if you know where the files need to go and what to update with in the system, you can use a freeware piece of software called Inno Setup compiler, which will allow you to build, rather easily, a setup.exe program.  If your VBA needs DLLs registered on the system it can handle that and registry read/writes and the whole 9 yeards. I love it. But make sure you get the Tools as well, it gives you a nice drag and drop gui that makes life easy. Even creates an uninstaller too, if you like.

 Anyway the site for inno is located here: 

 You want to download the ISPack (quick start kit) and make sure to install the ISTool editor, that's the GUI add on.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
As a side note, I've used Inno setup compiler to:
Create installers for VB/VBA Applications, C#, JAVA, and c++ apps.
Distribute system-wide registry changes in corporate network environments.
Uninstall other applications (you can have it launch stuff at the end of an install)
Distributing multiple MS Hotfixes in one nice easy setup.exe
rayluvsAuthor Commented:
Sound exactly what we need.

Thanx lots.

We're downloading right now.

Just to be clear, Inno Setup 5.2.3  is the actual programs?

and Toolbar2000 2.2.2 MUST alsoi be installed?

Please advice

No you don't need the Toolbar 2000 stuff..... Essentually you need 2 things Inno setup compiler and ISTool kit. It doesn't hurt to install the other items, you may need them later for other projects...but for need.

Great Plains, thats a very complicated piece of software from Microsoft for Managing Corporate finances if I am correct, I used to support it at Dupont. Hated it, we used to call it Great Pains.  I remember that our IT staff refused to perform a lease refresh on a few workstations that it existed on...they were too scared to muck it up with all the loos SQL and VB files etc...

You should be able to do what you need.
Oh, actual program is ispack-5.2.4.exe

It will handle all the loose ends for you.
rayluvsAuthor Commented:
Maybe your are referring to the initial SQL version or before (I worked with it since its DOS days).  GP has changed & moved up and I gotta tell'ya super friendly and powerful and best of all, you can modify it to whatever you want; making a great Value Added product and great income!  

Anyways, I guess its just a matter of choices; any question or assistance, feel free to ask; EE has been great for us here, why not give something back

Going back to my issue, all I need to download is ispack-5.2.4.exe, nothing else?

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Inno Setup is nothing more than an standard install packager, just like Advanced Installer.
rayluvsAuthor Commented:
Understood, but all I need to download is ispack-5.2.4.exe or anything else?
Yup, thats it. ispack-5.2.4.exe

And as far as the user experience for Great Plains, my user base loved it.

rayluvsAuthor Commented:

We'll give it try!
rayluvsAuthor Commented:
Just finish installing and its kinda' intimidating (jaja).  It looks like I have to detail all I want to include (????)

Can you give me an example of creating the installer.

Ok, basing on that I have to "Indicate" all resources for the project, can you give me an example based on the following:

I exported my VBA project whcih consiste of Microsoft Dynamics GP Objects:
CostonVendorsInvoice (Extender).cls
PurchasingInvoiceEntry (Grid).cls

my VBA References (for this example):
Ms ActiveX Data Objects (..\..\msado15.dll)

This is so I can understand it.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
When this is moved to the client's computer, how do they "install" this into GP?

The ADO reference should include the ENTIRE MDAC file, or check to see if this has been installed on the end user machine. You don't simply install the msado15.dll file - you must install the full file. However, many times you would simply check to see what's on the end user machine - in most cases, the correct version will be there.
rayluvsAuthor Commented:
I just used that file as an example.

I need to see an example of to setup the script.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
This sites shows how to use Inno:

The FAQ has some examples:

I'd still like to know how the user's GP program will "install" the files you send out ... just curious really
The most simple basic way is to start with ISTool, Create a basic project and go through all the properties such as company name, product name version etc. I typically go through all the options and build setup exe with out specifying a single project file. Once it compiles an empty setup.exe successfully, you know that your settings and version strings are accurate.

Next drag and drop your project file into the interface (ISTool),. Once you do that you can maintain a directory structure for the files or specify different locations to install them to. DLL files you can choose to have registered with the OS.

 Once you're happy with the files install locations, and the basics like that you can create a BATCH file or exe file, if need be to, launch any necessary SQL scripts or to execute any GP commands. If you're using ISTool's GUI you'll see on the left pane you have specific areas for Registry Settings, Files, Icons, Post-install programs to run (post-install tasks).  You can also have INNIO directly execute any commands from the GP Binaries.

 It may look intimidating at first, but once you get the hang of it, you'll find it well worth the very short learning curve.
rayluvsAuthor Commented:
Hi, and excuse the continuous questions (this is totally new to me), but...

1. What do you mean by "go through all the properties "?  
    You mean go to Tools -> Project Properties, or Tools -> Options?

2. What do you mean by "go through all the options and build setup exe with out specifying
    a single project file"?

3.  Attached is my Tools -> References used with VBA window.  I assume that if I manually import
     my VBA to another PC, I have to also goto Reference and included these files.  How do I say to
     the install that these files need to be included in the setup?

Again, thanx for patience
1. First go through the project properties, set the company name, the product name, version, default output filename(setup.exe), default install directory. Basically setting up the skeleton of the project.  Not worring about any files or shortcuts or tasks.

2. Once you're done with #1 compile the installer and make sure it compiles AOK. It's much easier to troubleshoot the install when you know the framework is good. Sometime Inno might not like a version string or the way the company name was specified. This is a way to flush that out before you get into the real meat and patotos....start with a good foundation.

3. Now start dragging and dropping your VBA files, specifying their destination folder(s). don't worry about any external DLLs just yet, or OCX Files. Once done here you can compile and test for any issues/errors. You can also specify options like "over write existing" or "overwrite older files" and whatnot. This allows you to maintain versioning, inno supports upgrade paths for future versions of your VBA (a bit more complicated) (once the files are in the project and in the GUI you can right-click and choose properties to see all the installation options for each file).

4. Bring in the required OCX/DLL files(your project references) by locating them and draging and dropping them into inno, set their destinations. Now here's where you want to specify to register the DLL files. You can specify options to test for existing versions/ as well here if you look at the properties. I typically do not install DLL files if they already exist and are the same version, INNO handles this AOK. As LMS points out MDAC is likely to already exist, especially if GP is already installed on the system.

I've attached a full ISS file generated by the IS tool of a project I wrote a few years back, but I didn't touch the script. I just used the GUI to set up everything.  

5. You

AppCopyright=2008 John J Thomas
AppName=WMI Asset Logger
AppVerName=WMIAL 5.7f
WizardImageFile=C:\Program Files\Inno Setup 5\WizModernImage-IS.bmp
VersionInfoCompany=John J Thomas
VersionInfoDescription=WMI Asset Logger
AppPublisher=John J Thomas
AppVersion=WMIAL 5.7f
UninstallDisplayName=WMI Asset Logger Free
AppComments=WMI Asset Logger Installer Build 2.57
AppContact=John J Thomas
DefaultGroupName=WMI Asset Logger
VersionInfoTextVersion=WMI Asset Logger 5.7
VersionInfoCopyright=2008 John J Thomas
WizardSmallImageFile=C:\Program Files\Inno Setup 5\WizModernSmallImage-IS.bmp
Source: COMDLG32.OCX; DestDir: {app}; Flags: regserver noregerror
Source: WMIAL57.exe; DestDir: {app}; Flags: overwritereadonly ignoreversion replacesameversion uninsnosharedfileprompt
Source: epRegPro.ocx; DestDir: {app}; Flags: regserver noregerror
Source: MBFormEx.ocx; DestDir: {app}; Flags: regserver noregerror
Source: MBTipDay.ocx; DestDir: {app}; Flags: regserver noregerror
Source: MSWINSCK.OCX; DestDir: {app}; Flags: regserver noregerror
Source: tabctl32.ocx; DestDir: {app}; Flags: noregerror regserver
Source: lastsuccessful.dat; DestDir: {app}
Source: m1tod.dat; DestDir: {app}
Source: wmial.ini; DestDir: {app}
Source: wmial-assets.mdb; DestDir: {app}; Flags: confirmoverwrite uninsneveruninstall
Source: wmialtip.dat; DestDir: {app}
Source: MSVBVM60.DLL; DestDir: {sys}; Flags: regserver noregerror uninsneveruninstall onlyifdoesntexist
Source: msvbvm50.dll; DestDir: {sys}; Flags: regserver noregerror uninsneveruninstall onlyifdoesntexist
Source: blacklist.ini; DestDir: {app}
Source: WMI Asset Logger on the web.url; DestDir: {app}
Source: EULA.doc; DestDir: {app}
Source: WMI Asset Logger Manual.doc; DestDir: {app}
Source: MSCOMCTL.OCX; DestDir: {app}; Flags: regserver noregerror replacesameversion
Source: Help.ico; DestDir: {app}
Source: Internet Explorer.ico; DestDir: {app}
Source: RemInstaller.exe; DestDir: {app}\RemInstaller; Flags: ignoreversion replacesameversion overwritereadonly
Source: reminstaller.ini; DestDir: {app}\RemInstaller; Flags: overwritereadonly ignoreversion replacesameversion
Source: InstallNow.exe; DestDir: {app}\InstallNow; Flags: overwritereadonly ignoreversion replacesameversion
Source: InstallNow.ini; DestDir: {app}\InstallNow; Flags: overwritereadonly ignoreversion replacesameversion
Name: {group}\View the Database; Filename: {app}\wmial-assets.mdb; WorkingDir: {app}
Name: {group}\WMI Asset Logger; Filename: {app}\WMIAL57.exe; WorkingDir: {app}
Name: {group}\User Manual; Filename: {app}\WMI Asset Logger Manual.doc; WorkingDir: {app}; IconFilename: {app}\Help.ico; IconIndex: 0
Name: {group}\WMI Asset Logger on the web; Filename: {app}\WMI Asset Logger on the web.url; WorkingDir: {app}; Comment: WMI Asset Logger on the web; Flags: createonlyiffileexists; IconFilename: {app}\Internet Explorer.ico; IconIndex: 0
Name: {group}\{cm:UninstallProgram, WMI Asset Logger}; Filename: {uninstallexe}
Name: {app}\ImportFiles
Name: {app}\CSVDumps
Name: {app}\RemInstaller
Name: {app}\InstallNow
Filename: {app}\WMIAL57.exe; WorkingDir: {app}; Flags: nowait postinstall; Description: Run WMI Asset Logger Now!
Filename: {app}\WMI Asset Logger Manual.doc; WorkingDir: {app}; Description: Read WMI Asset Logger's Manual; Flags: nowait shellexec skipifdoesntexist postinstall unchecked skipifsilent
Filename: {app}\WMI Asset Logger - website.url; Section: InternetShortcut; Key: URL; String:
Type: files; Name: {app}\WMI Asset Logger - website.url
Name: {app}\WMIAL56.exe; Type: files

Open in new window

Wow, that was wierd my Router crashed mid post..I've never seen a partial post from a disconnect. :)

Step 5, this is where I typically would write a batch file or VBS script(in rare cases a c# exe) to handle any remaining tasks. For instance if you need to execute sqlcmd.exe calls for SQL files to modify a database, or if you need to execute specific GP utilities upon completion, you can take advange of VBS to log the results and make decisions based off of return errorcodes or whatever logic you may need.
rayluvsAuthor Commented:
Thanx Lots!  we'll get on it ASAP.

Question (just to make sure), when you say 't dragging and dropping your VBA', you mean the VBAs files (*.vba); mines for exmple rae are du3278.vba, DU3107.vba, etc.

rayluvsAuthor Commented:
I just ran with the Wizard and workes excellent for my VB files, however for my VBA I have this problem:

When in VBA, there is no executable to install, only *.VBA is present.

Do I have to have a *.EXE for this part of the Wizard?
rayluvsAuthor Commented:
Any Advice on this?
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Does Great Plains have any sort of mechanism by which you can "install updates" or something along those lines? It would seem to me that you'd install your files to a particular location, then "launch" GP (or whatever tool is used on the client machine to "run" the update).

rayluvsAuthor Commented:
There is no mechanism for VBA install.  It's just that last question on *.EXE that we're in need of advice.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
My point is this: As jjThomas3 said in their "step 5",

"or if you need to execute specific GP utilities upon completion"

That's what I've been trying to say - you cannot simply deploy your VBA class modules and such and expect Great Plains to "see" them ... there has to be some method in Great Plains to "install" those items ... most VBA-based apps don't have anything like this (i.e. you must redeploy the entire project) but GP might be different. Your VBA project wouldn't have a typical .exe file .. your install would have to copy the needed files, then launch Great Plains, or some other utility, in order to integrate those changes.
rayluvsAuthor Commented:
Understood.  "step 5" is well taken in consideration.  As for "...GP utilities upon completion",  "GP utilities" has to be executed only if there is a GP update or upgrade.   For VBA I am not aware of any sequence or need for "GP Utilities" to be executed.  I consulted some of my partners and non has indicated that "GP Utilities" is needed for any VBA routine/apps included.  When they have to install any VBA, they just include any references and then import the package.  Non of them have an application to create Deployment (all is done manually).

So in essence, I come back to my question: there is no executable to install, only *.VBA or classes that has been modified or created.  The wizard requires a *.EXE.  How can I complete this process if I don't have any *.EXE?

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You could just include a bogus .exe file (just rename a text file with the .exe extension) if you must have one.

I assume then that your users would have to "import the package" into their GP installations?
rayluvsAuthor Commented:
Never thought of that.  Will try, Thanx!
rayluvsAuthor Commented:
Yes.  the admin has to import the packages.  I tried the bogus .EXE and it was successful.  I think that I have to import all packages rather having a setup program doing ut.  Then again I may be doing something wrong.

rayluvsAuthor Commented:
I'll close the question.  I have enough to play with.
rayluvsAuthor Commented:
The installation setup was only partially successful, but we this we'll use it for other apps.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.