Nov 12, 2013 #1 kdjonesmtb2 Technical User Joined Nov 19, 2012 Messages 93 Location US What is the correct vbscript to auto increment a starting txt value of '0000001 by 1 For example 0000001 0000002 0000003 etc Thanks
What is the correct vbscript to auto increment a starting txt value of '0000001 by 1 For example 0000001 0000002 0000003 etc Thanks
Nov 12, 2013 #2 strongm MIS Joined May 24, 2001 Messages 20,260 Location GB Here's one way: Code: [blue]Public Function AutoInc(strSource) AutoInc = Right(String(6, "0") & strSource + 1, 7) End Function[/blue] Upvote 0 Downvote
Here's one way: Code: [blue]Public Function AutoInc(strSource) AutoInc = Right(String(6, "0") & strSource + 1, 7) End Function[/blue]