ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Require mandatory info input in order for Exel to save changes. (https://www.excelbanter.com/excel-worksheet-functions/144630-require-mandatory-info-input-order-exel-save-changes.html)

VHG

Require mandatory info input in order for Exel to save changes.
 
Shared spreadsheet - When data is changed, can each cell have a identifier
requirement flag/alert (to who made the change, for example) in order for the
changes to be saved? No I.D., no saved changes.


JLatham

Require mandatory info input in order for Exel to save changes.
 
You could use conditional formatting to flag the cell to make it noticeable,
but no worksheet function is going to prevent the save regardless of whether
the cell is properly filled or not. That's going to take a little VBA code
in the Workbook's _BeforeSave event. It will look something like this
(change sheet name and cell address as required)

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
If Worksheets("worksheetWithCheckCell"). _
Range("cellAddressToCheck") Then
MsgBox "You must make entry here!", vbOKOnly, "Cannot Save"
Worksheets("worksheetWithCheckCell").Select
Range("cellAddressToCheck").Select
Cancel = True
End If
End Sub




"VHG" wrote:

Shared spreadsheet - When data is changed, can each cell have a identifier
requirement flag/alert (to who made the change, for example) in order for the
changes to be saved? No I.D., no saved changes.


mikerickson

Enter this code in the ThisWorkbook codemodule. Everytime a cell in the workbook is changed. A comment will be added to that cell, listing the time along with some user's name. I'm not really familiar with shared workbooks so this might not be the user who made the change, but some user's name will be added to the comment. This info will be added to the comment so it will reflect a running list of when that cell was changed.
Code:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
On Error Resume Next
Target.AddComment
On Error GoTo 0
With Target.Range("a1").Comment
    .Text Text:=.Text & vbCrLf & ThisWorkbook.UserStatus(1, 1) & Format(Now(), "hh:mm-mm/dd")
End With
End Sub

Quote:

Originally Posted by VHG (Post 502131)
Shared spreadsheet - When data is changed, can each cell have a identifier
requirement flag/alert (to who made the change, for example) in order for the
changes to be saved? No I.D., no saved changes.


JE McGimpsey

Require mandatory info input in order for Exel to save changes.
 
Look at Track Changes in XL Help ("View the history of changes to a
workbook").

In article ,
VHG wrote:

Shared spreadsheet - When data is changed, can each cell have a identifier
requirement flag/alert (to who made the change, for example) in order for the
changes to be saved? No I.D., no saved changes.



All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com