This document contains the details of the process to prepare a vb project so that it will run on a computer other than the one on which it was developed

  1. create a new folder; this will be your working folder for the program
  2. if any "external" files are required copy them into this folder; this includes any image files: wmf, gif, jpg, ico, whatever, any database files: mdb, ldb, whatever, and any data files
  3. when you save the program, first use File | SaveFormAs to explicitly save each frm file into your working folder, then use File | SaveModuleAs to explicitly save any bas files into your working folder, and finally use File | SaveProjectAs to explicitly save the vbp file into your working folder; the sequence may be important if you are changing the names of files as you are saving them, because some of the file names are stored in the vbp file; the vbw file is not technically important
  4. before saving the file for the last time before zipping and ftping it, please close all of the open windows: toolbox, properties, forms, code windows, etc; then when I run your program I do not have to wait for all of these to open first
  5. when a file is referenced through the ellipsis of a property, you must have previously [step 2 above] copied that file into your working folder; then follow the ellipsis to the copy of the file in your working folder; this applies for example to the DataBaseName, Picture and Icon properties
  6. when a file is referenced in code with a path, you must have previously [step 2 above] copied that file into your working folder; then you must omit the path from the code, using only the file name
  7. add these two lines of code into either the Sub Main procedure in the bas code module, or the Form_Load procedure of the startup form:
    Chdrive App.Path
    ChDir App.Path
    the ChDrive App.Path statement will cause an error in the g1012 lab if you use drive f: because f: is a network drive; in this circumstance use the following three lines of code with ChDrive App.Path commented out with a single quote:
    Chdrive f:
    'Chdrive App.Path
    ChDir App.Path
  8. depending on how you developed the program you may have accumulated files that you no longer need; so list the directory of your working folder and delete any files that are there that are no longer necessary
  9. if you have followed the above 8 steps then this step should not be necessary; but it is useful and educational to do it anyway; open the vbp file with NotePad and check the first several lines for paths in front of file names; if you find any then it is important to determine how they got there since any paths there will prevent your program from running on any machine other than the one on which you developed it; it can also be useful and educational to open each frm file with NotePad and search through the entire file for paths in properties and in code
  10. use superzip to create a zip file of all of the files in your working folder