Hi,
I have created a form in excel with invoice number which is alpha numeric.
im having a hard time fixing the error about the leading zeros in my invoice number. My invoice number is FIN19-0001.
i want to change it from FIN19-0001 to FIN19-0002, FIN19-0003 and so on.
but every time i click the button intended for that macro it will become FIN19-2. the 3 zeros are not included.
how can i fix it. can somebody help me.
thank you so much in advance.
\here is my code
Sub NextInvoice()
Range("B7").Value = Left(Range("B7").Value, 6) & 1 + Mid(Range("B7").Value, 7, 4)
I have created a form in excel with invoice number which is alpha numeric.
im having a hard time fixing the error about the leading zeros in my invoice number. My invoice number is FIN19-0001.
i want to change it from FIN19-0001 to FIN19-0002, FIN19-0003 and so on.
but every time i click the button intended for that macro it will become FIN19-2. the 3 zeros are not included.
how can i fix it. can somebody help me.
thank you so much in advance.
\here is my code
Sub NextInvoice()
Range("B7").Value = Left(Range("B7").Value, 6) & 1 + Mid(Range("B7").Value, 7, 4)