' ----------------------------------------------------------------
' Procedure Name: addZeros
' Purpose: Routine to add leading 0's to a string
' Procedure Kind: Function
' Procedure Access: Public
' Parameter makeLonger (String): the original string
' Parameter numberDigits (): length of required output FINAL STRING)
' Return Type: String
' Author: Jack from internet
' Date: 09-Feb-22
' ----------------------------------------------------------------
Public Function addZeros(makeLonger As String, numberDigits) As String
Dim x
'Adds 0's Leading 0 Leading zero to the front of the number until it's the correct length
'Change "0" to another character if you need a different character than 0
For x = 1 To (numberDigits - Len(makeLonger))
makeLonger = "0" & makeLonger
Next x
addZeros = makeLonger
End Function