Guest bananafish Posted August 13, 2002 Posted August 13, 2002 I am looking to format a number with leading spaces. ie I want to display 3 as " 3", 33 as " 3" and 333 as "333" What is the Format$ predefined numeric format for this, I thought it was Format$(intX, "##0"), but that would return "3", "33" and "333" I then tried Format$(intX, "000") but that gives "003", "033" and "333" Any ideas? Quote
Guest bananafish Posted August 14, 2002 Posted August 14, 2002 I tried format$(intX, "@@@" - and all I got was "@@@" and not " 3" Quote
Flyguy Posted August 14, 2002 Posted August 14, 2002 Try this: Dim x As Integer x = 3 Text1.Text = Format(x, "@@@") What version of VB or you using? Quote
Guest bananafish Posted August 14, 2002 Posted August 14, 2002 Well, that didn't work. Thanks for the help anyway. I am using .Net btw - I know I should have posted in that forum - but I didn't check where I was before I posted - and decided the question was probably the same for vb6 and .net. Guess I was wrong. Ive written a dinky little routine to do it now anyway. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.