Routine to Create a New Revision
Posted on 2006-05-20
I'm coding in VB6.
Does anyone know of a function where I can create a new sequential Alpha revision/version after passing a current revision (imagine a document control system where document revisions are roled upon checking in a new doc version.) For example, say the current revision of a document is 'B' and the function would have to return the next revision which would be 'C'. That part is simple enogh. (I expect the ASC/CHR functions would be used as part of this function).
However, the tricky part comes in being able to handle when the current Rev is 'Z'. it needs to return the next revision as 'AA'. Then, subsequent revisions would be 'AB', 'AC', 'AD' ...etc. Then, once again on 'AZ, we need to return 'BA', 'BB', 'BC' etc. There should be no practical limit to the uppermost revision (e.g. a revision may exists as 'AAA' ). This will no doubt call for some type of recursion.
I've assigned a high point value to reflect the urgency of the request, which is high.
Thanks much in advance.