Don't do it like that! Sql Server is a multiuser system and if you are creating "unique numbers" in your app code, you will get duplicates and they can cause massive problems.
Instead use an IDENTITY column in SQL and let it handle the auto-numbering for you - it will ensure that they are unique.
If you want to display a number with leading zeros, then all you have to do is use ToString with the appropriate format string:
Dim x As Int = 666
TextBox4.Text = x.ToString("D6")