Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sugarbrit17
 
Posts: n/a
Default 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   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

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   Report Post  
tjtjjtjt
 
Posts: n/a
Default

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   Report Post  
swisse
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Avoid user having to enter hours when using [mm]:ss format Lady_luck Excel Discussion (Misc queries) 3 January 4th 05 10:50 AM
Avoid user having to enter 00 hours when using [mm]:ss format Lady Luck Excel Discussion (Misc queries) 4 January 2nd 05 06:56 PM
INDEX, user input? chris w Excel Worksheet Functions 3 December 10th 04 06:07 PM


All times are GMT +1. The time now is 09:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"