I run a small library in a prison using Microsoft Excel and I have my data in a table (sortable drop down menu columns and auto colored rows). I want to add a "Add New Book" button to the form that brings up an input box waiting for the me to input the Author, Title, Genre {TEXT}, Price {Currency}, & Type {COMBOBOX} (hardback, softback, paperback). After getting the input I want the macro to generate a unique ID for the book with the prefix based upon the Type selected from the combo box. I need the program to loop through the entire A column of my table and find the lowest available number for that specific selection (hardback, softback, paperback) and the assign that prefix with that number as the book's ID.
ID example
hardback
HH-0105
softback
HS-0054
paperback
HP-1045
I want each number to four digits long plus the TYPE- prefix. Below is the form I have created so far but VBA is beyond my ability to code very well. I find it many magnitudes more difficult that C++ or PHP. Thanks for your help.
Module1
Forms.UserForm1Please Login or Register to view this content.
I would have attached an example file but the attache button on this form just brings up a thin horizontal line with no file browser.Please Login or Register to view this content.
Bookmarks