Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I input a warning message to remind the user to enter into.
I am trying to create a spreadsheet where I require the user to enter data
into a certain cell. If they do not enter data in this cell I would like a warning to pop up to remind them |
#2
|
|||
|
|||
You have to specify a trigger of some sort. IOW when do you want to check
if the user has made an entry in that cell? When he tries to save the file? When he tries to print? When he accesses some other cell? When he enters data into some other cell? HTH Otto "sugarbrit17" wrote in message ... I am trying to create a spreadsheet where I require the user to enter data into a certain cell. If they do not enter data in this cell I would like a warning to pop up to remind them |
#3
|
|||
|
|||
One way:
You could do it with an event macro. Something like this could get you started: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Range("A1") = "" Then MsgBox "Type a value in cell A1", vbInformation, "Value Missing" End If End Sub This way of doing it will be fantastically annoying for anyone who leaves the cell (in this case A1) blank. To use this, right-click on the sheet tab you want the message to appear for and choose View Code. There will be a Drop-down with the word General in it. Change it to Worksheet. Paste this: If Range("A1") = "" Then MsgBox "Type a value in cell A1", vbInformation, "Value Missing" End If into the middle of the lines that are already there. If you aren't familiar with macros, check out: http://www.mvps.org/dmcritchie/excel/getstarted.htm tj "sugarbrit17" wrote: I am trying to create a spreadsheet where I require the user to enter data into a certain cell. If they do not enter data in this cell I would like a warning to pop up to remind them |
#4
|
|||
|
|||
Make a macro in the Workbook_BeforeClose(), which checks if the user put some
data in cell A1. If none it puts a messagebox on the screen then it cancels the closure of the workbook, until the user has put some data in A1. Here is the code: Private Sub Workbook_BeforeClose(Cancel As Boolean) If IsEmpty(Range("A1")) Then MsgBox "Please enter data in A1." Cancel = True End If End Sub Swisse |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Avoid user having to enter hours when using [mm]:ss format | Excel Discussion (Misc queries) | |||
Avoid user having to enter 00 hours when using [mm]:ss format | Excel Discussion (Misc queries) | |||
INDEX, user input? | Excel Worksheet Functions |