PDA

View Full Version : tips and techniques on how to properly design your vba for distribution



drawworkhome
12-07-2009, 07:35 PM
hi all,
i am getting closer to accomplishing by 1st vba project. however, i can foresee difficulties in distributing the final product to multiple users. can any one recommend and ideas/stratagies from your experience that i may use for future work?
thank you.
e

Jan Karel Pieterse
12-07-2009, 10:58 PM
See:
www.jkp-ads.com/articles/distributemacro00.asp (http://www.jkp-ads.com/articles/distributemacro00.asp)

Bob Phillips
12-08-2009, 02:24 AM
What difficulties are you foreseeing? The answer might be an implementation technique as Jan Karel alludes to, it might be a process issue (installing on other machines controlled by IT), it might be an issue with usage where an addin would help.

drawworkhome
12-08-2009, 04:41 PM
thanks to the both of you for responding.
can either of you offer any deployment do's and dont's tips?

Bob Phillips
12-08-2009, 05:29 PM
I think a few more details of your application (overview),m your audience, your infrastructure would help to answer than more sensibly.

drawworkhome
12-08-2009, 05:51 PM
well, actually i just dont know how to go about it. do i just email it to every one for the intial release? i am concerned about how to make it easy to fix the inevitable bugs that arise and am looking for somethink like how windows can check for updates automatically and all that entails.
am i asking to much for my unmanaged code?
i work in an office with 12 others who want to use this workbook.
we are all on a network so may run into issues with virus software, altho i dont think that will be an issue as i have used snippits to test some functionality at work and nothing informed me of problems.
i am developing this at home on a desktop so have to "fake" the network. all i am doing in that portion is creating some files and folders with script.
the audience is primarilly a mix of kinda savvy people to some people who just dont know much about computers/windows period. so i would like this "install" process to be as painless as possible for them but i do want some user interaction so that they are aware that something is happening.
erik

Jan Karel Pieterse
12-09-2009, 02:16 AM
You can use the ideas here to build the updating part:
www.jkp-ads.com/articles/updateanaddin.asp (http://www.jkp-ads.com/articles/updateanaddin.asp)
Other than that, I'd stick to the emailing around method until you're ready to go. Then look at how to deploy the file in such a way that everyone is capable of "installing" it.
Is everyone on the network all of the time? If so, consider putting the addin on the network in a location everyone has access to. Make the file readonly so you can simply replace it if there is an update. Then install the addin for everyone and click NO if Excel offers to copy the file.

Bob Phillips
12-09-2009, 02:40 AM
An addin may be appropriate, especially if your app is an app in respect of it being separate from the data, keep the code in the addin, keep the data in separate workbooks. This may require some changes to the code (opening the workbooks, referencing them specifcally and so on).

Did you see my response in your installer thread?

You could use an installer or Jan Karel's technique to store the addin in a specified directory and then have a user process that installs it in Excel. That is not too onerous adn gives you the explicit user action that you desire.

drawworkhome
12-09-2009, 07:34 PM
i did see your response in the installer thread. thank you all for your help in this. i am leaning twords the add-in method. sure would be nice to package the workbook....
erik

Bob Phillips
12-10-2009, 02:47 AM
I can help you with Inno Setup if you try that as I use it al of the time.

drawworkhome
12-10-2009, 06:05 PM
xld, i appreciate that and will take you up on your offer.
erik