Pop up to flag an entry

A

Andrew Mogg

Is there any way to have a pop up occur to inform user that to continue a
value must be entered into a certain cell. eg if user selects 'yes' the a pop
up flags them to enter a value in adjacent cell
 
S

Stefi

Try this:

Data>Validation>Settings>Allow:Custom, Formula: =A2<>"yes"
Input message: Uncheck "Show input message when
cell is selected
Error alert: Check "Show error alert after invalid
data is entered, Style: Information, Fill "Title" and "Error message" as you
like (e.g. Fill next cell!)
OK

--
Regards!
Stefi



„Andrew Mogg†ezt írta:
 
G

Gord Dibben

You use the word "selects"

Is user selecting from a menu of choices, like a Data Validation Dropdown
list or is user simply typing "yes" in a cell?

Either way, to get an actual pop up message you would need event code to
remind user.

This is a reminder only.

Private Sub Worksheet_Change(ByVal Target As Range)
Const myRange As String = "A1" ' "A1:A10" if a range
On Error GoTo endit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(myRange)) Is Nothing Then
If Target.Value = "yes" Then
MsgBox "You must fill in " & Target.Offset(0, 1).Address
End If
End If
endit:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code". Copy/paste the above into
that sheet module.

Edit to suit. Alt + q to return to Excel.


Gord Dibben MS Excel MVP
 
A

Andrew Mogg

Thanks Gord,
However i seem to get a 'compile error' message when i try this.
Also if you can have the text that i can change on the example in italics
that would be great. (so i know what are commands & what is ultimately
displayed.
It would seem you have vast amounts of knowledge on this type of programming
(if thats what it is) so do you know of a resource for beginners that i may
be able to access to help me understand the terminology & process.
Thanks again
 
G

Gord Dibben

Did you copy the code exactly as I posted? Maybe you left off the "End Sub"

The error message must given more info than 'compile error'.

Did you copy it to the worksheet module?

What do you want in Italics?

The word you type or choose from a dropdown?

Simply format the input cell as Italics.

I don't have a vast knowledge of programming.

Most of what I learned has been from following the postings on these new
groups and shamelessly poaching the code that I need.

Some has come from using the macro recorder and using VBA help.

A good place to start is David McRitchie's getting started site.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

A few other sites in no order of preference which can provide examples.

http://www.codesites.com/
http://www.contextures.com/
http://www.cpearson.com/excel.htm
http://www.j-walk.com/ss/excel/links/
http://www.mvps.org/dmcritchie/excel/excel.htm
http://edc.bizhosting.com/english/index.htm
http://www.oaltd.co.uk/Excel/Default.htm
http://www.vbapro.com/
http://www.rondebruin.nl/code.htm


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top