A neat way of retaining a history when using UserForms

adambc

Active Member
Joined
Jan 13, 2020
Messages
412
Office Version
  1. 365
Platform
  1. Windows
Apologies in advance that this post is not a question, but I thought someone might find it useful and I didn't know where else to post it - apologies also if it's been posted before (but I couldn't find it when I searched!).

I have recently created a "log" which has a "Next Action" column, but using a UserForm to update the record, the previous record is overwritten, loosing the previous Next Action value and as a result, previous actions are lost (and one of the User Requirements was to maintain a history of Next Actions).

To overcome this, when I load an existing record into the UserForm, the value in the Next Action column is written to a Read Only "Previous Actions" Text Box on the UserForm, alongside a "New Action" Text Box. When I write the updated values back to the record, if "New Action" is not blank ie a New Action has been entered, I concatenate ...

- "DD/MM/YY - " (ie TODAY)
- the "New Action" value
- CR
- the "Previous Actions" value

... which writes the New Action AND all the Previous Actions to the record ready for further updates, creating a reverse chronological history of all Next Actions, each one on a new line.

If the "New Action" Text Box is blank, I only write back the "Previous Actions" value.

Just thought someone might find this useful?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,224,566
Messages
6,179,551
Members
452,927
Latest member
rows and columns

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top