I created an inputbox where the user would need to enter a two digit code. The number from the inputbox is then used when saving the file as .csv file, however, the number is being changed to "1" instead of "01". How can I correct my code where the number format remains two digits when it's preceded by 0?
The format for my file name should be MTPO_20210305_USERID-01_2021 but it's being saved as MTPO_20210305_USERID-1_2021
Sub SaveFiles()
Dim MySavePath As Variant
Dim UserID As Variant
Dim MyFileName As String
Dim message As Integer
Dim MyYear As Integer
Dim MyMonth As Integer
Dim MyDay As Integer
MyYear = Year(Now)
MyMonth = Month(Now)
MyDay = Day(Now)
UserID = Application.InputBox(Prompt:="User-ID", Title:="Enter your UserID", Default:="Should be your TSO not your AIN")
message = MsgBox("Is This Correct?", vbInformation + vbYesNo, "You Entered: " & UserID)
inputValue = Application.InputBox("Upload Number", "Please enter a 2 digit sequence number for this upload.", , , , , , 1)
Select Case message
Case vbYes
Case vbNo
End Select
MySavePath = "C:\Users\Documents\Upload Automation\Test Upload Location"
ActiveWorkbook.SaveAs Filename:=
MySavePath & "\" & "MTPO" & Format(Now, "yyyymmdd") & "" & UserID & "-" & inputValue & "" & MyYear & MyData & ".csv", FileFormat:=xlCSV
End Sub