ゼロサプレスモジュール

使い方

str = Head_Zero(123, 6)
str = 000123

StrNum : 数値
MaxLen : 桁数

<%
Function Head_Zero(StrNum, MaxLen)

If Not IsNumeric(StrNum) Then StrNum = 0
Head_Zero = Right(String(MaxLen, "0") & Abs(CDbl("0" & StrNum)), MaxLen)

End Function
%>