Hello everyone, I'm quite new to VBA coding and thanks to my C&P/editing skills, I’ve managed to make an amateur CRM for my own needs in my company.
ss.JPG
I’ve come up with an user form(you can find its screenshot attached) which stores the data in one sheet(Maindata) and also creates a new another one(Sheet name is getting its name from center ID textbox- so its dynamic) which contains that center’s specific data and financial projections.
Let me give you a brief overview of the spreadsheet;
Maindata: Data entry starts from A2 and goes to AU2, (47 columns in total) the spreadsheet hasn’t populated yet, but when it does it will be probably +400 row long.
Basically what I want to achieve is; Search&Update ability within user form. I can’t bring pre-registered data back to my user form. The search should bring partial matches as well, so there could be more than one registry when searched. To select the right one from search inquiry, I’ve added a list box that should give me the search results inside and when double-clicked, it should bring the whole row’s data back to user form. At the point of update, it should update/overwrite on the related row(Should not create a new registry) and it should update the dynamic named sheet’s(Which is created with the same name with “Center ID” back at the registry) specified cells.
To be more specific with the search&update;
- A user will type into "textbox1"
- Hit search button which is called "cbSearch"
- Matching registries will be listed in "listbox1"
- Upon double-click userform will be filled with the selected registery info.(Listbox will show 4 cloumns of data but after dclick, the rest of the information will be shown on the userform)
- Update button should overwrite on the existing info on "maindata" sheet and the sheet that matches with it's center ID.
If you can show me how to fill a textbox with the selected item's info from listbox I can adapt it to the rest of the 46 columns
"A" column's info should go into = TB0 "B" column's info should go into = STN
I'm putting the code of the save button which has the %90 of the code in the userform.
Bookmarks