Posts by grideron

    Hi Roy.

    I have a lot of work to do in order to get your userform working for me.

    Once i have managed to get it to work as i expect, i will probably need to do some filtering for the listbox, so yes please if you will, provide the userform for listbox filtering.

    Once again, you have provided great and meaningful support.

    Thanks a million.


    Hi Roy

    I have not thought about using a column for each type of device, but would definitely consider it.

    I will have to change the way i am planning this, so that i can add 'all' data into one worksheet. I guess i will have to add the device type in row A and then the rest of the information into the subsequent columns? For example in Cell A2, add the device type (TV), then the following cells will have the repair record information. Is this what you mean?

    Hopefully you're amended excel will give me more insight into this.

    Thanks again.


    Hi Roy

    You have cleaned up my messy code and even the UI looks better.

    I sure will take your advice and try and keep the userform looking professional and tidy. However, i have a long way to go in order to get to a comfortable level of understanding of Excel VBA, but you have certainly helped me on my way.

    With regards to the 'adding of new tabs', my idea was to add a new tab (worksheet) every time a new product (e.g Mobile Phone, Fridge, Computer....etc) was repaired. To be honest, i don't know of any other way to handle this? Or would it be a case of adding all repair records into one long list in one tab, and using some kind of search option to pick records?

    And for point number 5, what i was trying to envisage is something like auto-complete search function. For example, if there were 50 repair records across several tabs (worksheet). And 25 of these records had the words 'power' in them, i could type the word power, and as i type each letter, the listbox would populate to match records containing each letter until i typed the whole word 'power' and eventually only the 25 records with the word 'power' would be displayed in the list box. This way it would save me from going through each tab looking for these repair records.

    Anyway, i will use your form as a base to develop and realise my idea for this project.

    Your suggestions above and any other suggestions are greatly appreciated and welcomed.

    Thank you very much for your support on this.

    Good evening.


    Below is the modification you asked for ...

    Hope this clarifies

    Carim, really appreciate the modification you did.

    Thank you for your great help.


    Hello Carim.

    Thank you for replying to my problem.

    I am not very good at Excel VBA and i put this form together from different examples online and watching youtube videos.

    I am still learning and admittedly finding it a little difficult to understand VBA properly, but i am still trying to learn.

    I am not sure where i should put your code - last = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row + 1

    Appreciate your help.

    Thank you Carim.

    Repair Database.xlsm

    Hi folks.

    I am a noob when it comes to excel vba and am currently learning.

    I am creating an excel vba database to record repairs of electronic/electrical products.

    I have managed to put together the building blocks of the database front, but am struggling with the code to do the following:

    1. Add repair record to the next row down. When I add a new repair record, it overwrites the current one.

    2. After I add the repair data nothing happens. Ideally would like a message saying I have added data successfully and data is then cleared in the userform.

    3. How can I add a new product tab, for example Fridge or Mobile phone? At present I only have a TV product tab, but later want to add more product tabs.

    4. Once a new product tab is created, is it possible to automatically have the same columns as the TV tab?

    5. How can I display list of repair records in the search results box as I type any words from any repair record from different tabs?

    I have attached my database excel file.

    I am open to constructive criticism, which no doubt will help me to learn.

    Any help would be greatly received please.

    Thank you.