Formatting Last String

Hi,

I have a code to generate the ticket by using the timer with some criteria.

dim a,b,c,d,e as string a="STB" b="0023456" c="00" d= a+"-"+b+"-"+c if CDbl(tiket.Text) >0 then Listbox1.AddRow d+tiket1.text tiket1.Text=str(val(tiket1.text)+1) tiket.Text=str(val(tiket.text)-1) end if

The Result is

STB-0023456-001 STB-0023456-002 STB-0023456-003 STB-0023456-004 STB-0023456-005 STB-0023456-006 STB-0023456-007 STB-0023456-008 STB-0023456-009 STB-0023456-0010

what i am expecting is,

STB-0023456-01 STB-0023456-02 STB-0023456-03 STB-0023456-04 STB-0023456-05 STB-0023456-06 STB-0023456-07 STB-0023456-08 STB-0023456-09 STB-0023456-10
any helps ?

thanks
Regards,
Arief

C = “0”

[code]dim a,b,c,d,e as string
a=“STB”
b=“0023456”

if val(tiket.Text) >0 then

Listbox1.AddRow a+"-"+b+"-"+ format( val(tiket1.text) ,"000")     
//assumes this will never exceed 1000. If it can, consider "0000"

tiket.Text=tiket1.text   //old number becomes the added row
tiket1.Text=format( val(tiket1.text)  +1,"000")     new number increased by 1

end if[/code]

thanks…

its worked now…

regards,
Arief