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 Pop Up Box

I am using the following code, but I am want the pop up message box to
pop up when any cell in a specific cell range S2:S24 is not blank, but
"Entry". I would also like the message to display the contents of the
A column of the same row in the message. Is this possible?

Thanks
Todd Hudson

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("S2:S25")

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.
MsgBox "Lizard Short" & Target.Address & " signal!"
End If
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Message Pop Up Box

I am not sure what you conditions for display are, but as written, it
displays if the cell changed is empty or contains the word Entry. Change to
suit your conditions.

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("S2:S25")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
if Target(1) = "Entry" or isempty(Target(1)) Then
MsgBox "Cell " & Target.Address & " changed, column A: " & _
Cells(target(1).Row,1).Value
End if
End If
End Sub

--
Regards,
Tom Ogilvy

wrote in message
ups.com...
I am using the following code, but I am want the pop up message box to
pop up when any cell in a specific cell range S2:S24 is not blank, but
"Entry". I would also like the message to display the contents of the
A column of the same row in the message. Is this possible?

Thanks
Todd Hudson

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("S2:S25")

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.
MsgBox "Lizard Short" & Target.Address & " signal!"
End If
End Sub



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
Pop up message HRlady Excel Worksheet Functions 1 April 22nd 07 10:14 PM
Message Box James Hamilton Excel Discussion (Misc queries) 1 November 1st 05 03:45 AM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 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
Message Box Chip Pearson Excel Programming 3 August 27th 03 03:33 PM


All times are GMT +1. The time now is 10:55 AM.

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"