Visual Basic for Applications/Big Number Arithmetic with Strings

Summary

 * This VBA module is intended for Microsoft Excel but can run with minor changes in any of the MS Office applications with a VBA editor.
 * The data types of VBA prevent big number calculations.  That is to say, beyond twenty or thirty digits, and even then much care is needed to avoid overflow.   Strings have few such restrictions, being limited in most cases to the size of the memory space of the application.
 * The code module below includes most of the basic arithmetic functions without any size restriction.
 * The work is not by this author, but credit should be given to Rebecca Gabriella's String Math Module notes at Big Integer Library.  This author has made only cosmetic changes to the work, and added a test procedure to illustrate its use.

Code Notes

 * The module includes functions for the following: Addition, subtraction, multiplication, and division, all using integer strings.  Also included are conversion functions to restore base10 from some other base, and to produce a new base from some existing base10 input.   Other  support functions such as RealMod are also included.
 * No output code to the sheet has been provided. Owing to Excel's habit of truncating numbers, even if they are strings, users who want to use the worksheet should concatenate an apostrophe before the display string to prevent this happening.  The apostrophe will not be displayed. It is unclear how else this device affects the subsequent use of the numbers.
 * A remainder after division is produced. It can be found as sLastRemainder, and is public.
 * Users who install code in MS Access should change the Option Compare Text to Option Compare DataBase.  The former is intended for MS Excel.

Added Big Math Fuctions

 * Factorial makes use of Multiply and other integer math functions of the main module.  It is of course fairly slow but is not otherwise limited in any practical way.   The code has been arbitrarily limited to calculating values up to 1000!, but this can be adjusted by the user.   DoEvents is important here, since it allows breaking the run if an unwise attempt is made. Reciprocal factorials and negative factorials are not handled here.
 * IntStrByExp raises integer strings to an exponent. Again, negative exponents cannot yet be handled in this procedure, though the number to raise can take a negative value.