Excel 2010
VBA experience: Very Junior but not quite beginner
Userform purpose is: Data Entry tool with a search /update /Delete function.
Supplied example is stripped of private information and beauty :-) to isolate code/functionality issues.
(please excuse in-code scribblings and deactivated non functional items)
*search fills listbox1 with matching results
selecting result should allow user to view data from that row in Userform and either update or delete that row.Stripped_dev.xlsmStripped_dev.xlsm
Issue: Delete function (after searched and selected from listbox of results) does not delete selected (activecell) row. Rather it always deletes first row of data. I have tried numerous alternative methods to get the selection of the row in the listbox to set C as the activecell similar to the "amend" code, but it just blows up and errors. So I'm leaving it somewhat in it's initial partially functional state. (Note: if you enter the exact query search, as in an exact "abc-002" vs. a * search like " abc* " it will set the correct activecell and delete it. But that kinda defeats the purpose of a search function. )
The amend/update function successfully amends the selected (activecell) row after selecting the results from a * search. scratching head as to how to get the activecell status similar to the amend/update function to work with the Delete.
This has been cobbled together using a number of different templates and my own limited vba to get the functionality desired . (I feel obliged to make clear that I am not the Originator of the majority of the cod. So now I'm trying to build off functional models. I made attempts first and don't think I was even close so most of the good stuff isn't mine. Meaning, there are parts of this that I really do not claim to fully understand how exactly it works. I thought I had a clue, but clearly not so much.)
I do have a list of functionality that I would like to add, but I think the Delete function is fairly key to lock down before trying to add bells and whistles.
Other things I need to figure out just in case someone has a solution/code/link to offer:
1.Protect the spreadsheet from direct access (not using Userform) to all but one or two usesr. (force non admins users to use Userform only, but allow admin to easily access sheet directly when needed.. ? Userlevel password protection)
2. if userlevel passwords is possible, setting up users auto signature. (like a database where a user logs in and all edits by that user are associated with that user (i.e. automatically show "input by xxxx" on "date" ))
3. additional "Search by Due date" function. (this might be overkill, but the ideal function would be to be able to set a search based on one column "Due Date" and return AND OUTPUT a listing of all rows "due between date A and date B".
I'm sure there are more, but I don't want to get off target. Before I worry about any of that, I have to get the Delete to work. Else I will need to change my gameplan.
Thanks in advance.
Bookmarks