MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Message/error boxes (like in access) or flashing text incoroprated Excel 2000

Posted by Hemant on September 10, 2001 7:44 AM


I have a cell where once it reaches a certain limit it reads "Have meeting" as this is very sutle it can go unnoticed. I was wondering if anybody knew how to get a meesage to pop up (like in access msgbox ("have meeting")) To grab the users attention or even if they could make the text flash. I know i have to use modules but i do not know how to in excel (as access is another story). All help is appreciated.



Posted by Mark O'Brien on September 10, 2001 8:02 AM


I'm assuming you haven't used VBA too much with excel. So I'll put step by step instructions.

Open up Excel and go to the sheet with the cell that will contain "Have Meeting".

Click on the worksheet name with the RIGHT mouse button.

Choose "View Code" from the menu.

Copy and paste this code into the blank section on the right had side:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As String

MyRange = "A1"

If Me.Range(MyRange).Value = "Have Meeting" Then
MsgBox "Have Meeting"
End If
End Sub

* You should change the line : MyRange= "A1" to whatever the address of the cell that will contain "Have Meeting".

I hope this is helpful, if you have any problems/questions, just repost to the message board.