PDA

View Full Version : Update records from user form



sujittalukde
11-02-2007, 11:18 PM
I have made a user form and saving data to a sheet . New records are appended below the last filled row. However some textbox fields are required to be entered later which are already saved in the sheet. I want to retrive those rows from in the user form and update the fileds and then if click save button it should update the record rather than saving a new record.
Can this be done?

XLGibbs
11-03-2007, 11:09 AM
Yes it can be done, and not terribly difficult of the rows have some type of unique identifier

steve.t
11-06-2007, 03:05 AM
Dear XLGibbs, I'm a VBA newbie, and I've been looking for an example of how to do this for days. Would appreciate some sample code or a pointer to a specific "How To", or anything that might be of help. I know it can be done; I've seen it in action; but how??

Charlize
11-06-2007, 03:33 AM
Take a look at this kb article : http://vbaexpress.com/kb/getarticle.php?kb_id=941

You can add a button to save the data to the activerow.

steve.t
11-06-2007, 07:38 AM
Dear sujittalukde, XLGibbs and Charlize,

Firstly, Charlize, thanks for the quick response. You were definately on the right track. I think you were "close, but no cigar".

After much surfing the web (I would rather have been surfing Waikiki), I found the answer (no, not 42).

I can't send a link because I haven't had a minimum 5 posts, so:

Google "Chapter 20: Creating Advanced User Forms"

The first search result should be it.:beerchug:

Please let me know if you have success with it.

Cheers and Goodnight (or Good morning, depending on where you are),

Steve