VBA event to 1) print now, 2) print username & 3) prevent deletion

Magdoulin

Board Regular
Joined
Jan 11, 2013
Messages
73
Hi guys, I hope everything is going well with you.

Look, I need your help please.


I need to create Save event. So, once the active sheet is saved, the code acts as follows:

  1. Type the date and time (NOW function, I believe) in the active row, second cell (Column B).
  2. Type the username (Environ username, I guess) in the active row, seventh cell (Column G).
  3. The last thing to auto-close the sheet once these commands are completed and the sheet is saved, however, and that’s the challenging thing that I’m not really sure if it’s doable, I want the sheet once it’s re-opened again, I need the rows those contains data, to be, editable yes, but not removable, like a footprint.

Could someone help with the code writing? I’m familiar with the needed functions for the first two points, yet, I’m not that good to write the code, and for point# 3, I don’t know at all how to do it or what to use.

Thank you guys.

This topic was originally posted on OZGrid but I haven't got a solution:

https://www.ozgrid.com/forum/forum/...print-now-2-print-username-3-prevent-deletion
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Editable implies removable.
You could track changes on a hidden and protected sheet so you can track changed content, who made and when a change occurred.
Do you mean auto-close the workbook?
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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