Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Required cell content
I need to be able to require a person to put initials in the row they are
entering or modifying. Is there a way to make Excel not save until this information is added? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Required cell content
Let's say your user is entering data in some row in Sheet1 and you want the
initiials in column A. In worksheet code (for Sheet1) enter: Private Sub Worksheet_Change(ByVal Target As Range) myrow = Target.Row End Sub This will capture the user's row In a standard module enter: Public myrow As Long This make myrow static & public In ThisWorkbook code enter: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim mycell As Range Dim s As String s = "A" & myrow Set mycell = Sheets("Sheet1").Range(s) If IsEmpty(mycell.Value) Then mycell.Value = InputBox("enter initials: ") End If End Sub So the worksheet code captures the row in which the userentered data. The ThisWorkbook code uses the row information to test for and propt for the initials. -- Gary''s Student "Catlady" wrote: I need to be able to require a person to put initials in the row they are entering or modifying. Is there a way to make Excel not save until this information is added? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Force required entry in cell before leaving that cell | Excel Worksheet Functions | |||
copy comment content to cell content as data not as comment | Excel Discussion (Misc queries) | |||
Excel - create button to replace cell content with cell value | Excel Worksheet Functions | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) |