Create an alphanumeric value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I once had a code that created an alphanumeric value based on a combobox
selection in addition the code would check the record for the first two
letters then then add the next higher number to the corresponding cell. It
looked something like this XX001,XX002 and would keep adding based again on
the combobox selection, however I have sence lost the code and therefore
asking all you GURU's to help me recreated it. For the life of me I cannot
remember.

Thanks
 
No I did not get it here, I thought it was a VB code however it was a
function to create the number based on the cell next to it sorry for the
misinformation, So back to the drawing board.
 
Will something like this help???

Sub test()

ActiveSheet.ComboBox1.ColumnCount = 2
ActiveSheet.ComboBox1.Clear
For i = 0 To 10
ActiveSheet.ComboBox1.AddItem "AA"
ListNumber = "AA" & Format(i, "#00000")
ActiveSheet.ComboBox1.List(i, 1) = ListNumber
Next i

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top