How to add a letter at the begining of a number

Hi
i want a code in vb to add a letter at the begining of a number. I have counter in vb application, it counts everytime when you exported the data to a file.
exp: counter number: 1 ---it has to be with the code ---> AB1; count nr: 2 -- has to be ->AB2, etc ..... .
the code has to add "AB" everytime at the begining of a numer.

 
jefmelkenbeekAsked:
Who is Participating?
 
vinnyd79Commented:

Couldn't you do something like this?
label1.text = "AB" &  readLastnumer.ToString
0
 
Patrick MatthewsCommented:
Hi jefmelkenbeek,

How is this counter used?  Where is it stored?  How do you use it in your app?

Regards,

Patrick
0
 
jefmelkenbeekAuthor Commented:
hi patrick,

it counts everytime when you export data to word.
exp: all textfields exported to word.

when i click on export_click button (vb.net) it has to count.
it is stored under:
Private sub export_click (byval sender as ....)
dim ...
...
if (flagConfirmed = False) then
 label1.text = readLastnumer () + 1
end if
 
0
 
jefmelkenbeekAuthor Commented:
no it doesn't work.
label1.text = "AB" &  readLastnumer.ToString in stead of label1.text = readLastnumer () + 1 ==>doesn't work
0
 
jefmelkenbeekAuthor Commented:
sorry Patrick,

it works :-). thank you very much for your help
Greetings,

jef
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.