Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default message box pop up for a given value in a cell

Hi All,

I want a message box to automatically appear if a given value i
entered in a cell. If I was writing a macro, I could do somethin
like...

If Range("a1").Value = "given value" Then
MsgBox ("my message")
End If

but I want the message box to appear automatically, ie without havin
to run a macro.

CHEERS for any hel

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default message box pop up for a given value in a cell

hi

got this from http://support.microsoft.com/default.aspx?
scid=kb;en-us;213612&Product=xl2002

Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range

' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("A1:C10") <you may modify the
range

If Not Application.Intersect(KeyCells, Range
(Target.Address)) _
Is Nothing Then

' Display a message when one of the designated
cells has been
' changed.
' Place your code here.
'<Insert your validation here
MsgBox "Cell " & Target.Address & " has changed."

End If
End Sub
-----Original Message-----
Hi All,

I want a message box to automatically appear if a given

value is
entered in a cell. If I was writing a macro, I could do

something
like...

If Range("a1").Value = "given value" Then
MsgBox ("my message")
End If

but I want the message box to appear automatically, ie

without having
to run a macro.

CHEERS for any help


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default message box pop up for a given value in a cell

Thank you, this is what i need

--
Message posted from http://www.ExcelForum.com

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
Need to get cell input message be attached to cell R Excel Discussion (Misc queries) 3 December 21st 07 03:50 PM
#VALUE message in cell JohnE Excel Worksheet Functions 4 June 29th 07 08:04 PM
I keep getting the message "too many different cell formats" Anky Excel Worksheet Functions 1 June 30th 05 04:03 PM
Displaying a message in a message box without requiring user to click anything to proceed Android[_2_] Excel Programming 2 June 25th 04 06:44 PM
Pop Up Message = Cell Wayne[_5_] Excel Programming 1 May 20th 04 03:53 AM


All times are GMT +1. The time now is 10:22 PM.

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

About Us

"It's about Microsoft Excel"