A
Armin Zingler
Family said:Wouldn't you need a formatting string to get that? Your post did not
include any.
Did you try it? I don't know how "000" in the _middle_ can be left out
without formatting. Only leading zeros would need a format string.
Dim newnumber, oldnumber As String
oldnumber = "2009000144"
newnumber = (CLng(oldnumber) + 1).ToString
MsgBox(newnumber) '=> "2009000145"
Maybe I missed the point. I read the OP's first post again but I'm still
looking for the problem. He clearly said he has a 4-digit year followed by a
6-digit number in a string. The number is to be incremented. Nowhere I read
that the current year should be taken into account.
Armin