#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Message box

I have a cell that checks the vertical totals with the horizontal totals and
shows the difference if they are difference.
I would like to add a pop up message box if they are different using sheet
code.
Thanks,
Gordy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Message box

Right click the sheet tab and select view code. Add the following. You will
need to change the cell reference...

Private Sub Worksheet_Change(ByVal Target As Range)
If Round(Range("A1"), 3) < 0 Then MsgBox "Out of Balance"
End Sub

--
HTH...

Jim Thomlinson


"Gordy99" wrote:

I have a cell that checks the vertical totals with the horizontal totals and
shows the difference if they are difference.
I would like to add a pop up message box if they are different using sheet
code.
Thanks,
Gordy

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Message box

Surely, vertical totals will be a sum of the column, horizontal totals will
be a sum of the row, so they will be different?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Gordy99" wrote in message
...
I have a cell that checks the vertical totals with the horizontal totals
and
shows the difference if they are difference.
I would like to add a pop up message box if they are different using sheet
code.
Thanks,
Gordy



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
replace VBA run-time error message with custom message BEEJAY Excel Programming 13 July 14th 06 03:59 PM
Replace Excel Message w/Custom Message Kevin R Excel Programming 1 May 18th 06 04:13 PM
Intercept/replace standard 'cell protected' message with my own message? KR Excel Programming 3 March 16th 06 02:31 PM
Opening an attachment of a message that has a message as attachmen vetron Excel Programming 0 January 30th 06 06:17 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


All times are GMT +1. The time now is 03:20 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"