[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

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.

 
0
jefmelkenbeek
Asked:
jefmelkenbeek
  • 3
1 Solution
 
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
 
vinnyd79Commented:

Couldn't you do something like this?
label1.text = "AB" &  readLastnumer.ToString
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now