WArning message #2

I want to put an error warning in to a s/s. I have a formula with a cel
AX=TX returning a true or false value, if the value is false, I wish t
have an error message occur to alert the user that the values are no
the same, either on occurrence or before saving ideally. 
Is this possible? 
If so how?
Thank you

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

0
7/16/2004 10:53:13 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
635 Views

Similar Articles

[PageSpeed] 32

I think I'd just change your formula.  I'm gonna use A1 and B1 for my two cells:

=if(a1=b1,"","Warning--values don't match!")

Format in nice big red bold letters.  Place it close to where the users input
data, I bet it would work ok.

If you really wanted a macro, you could have a workbook event fire before the
user saves the workbook.

rightclick on the excel icon (to the left of File|Edit|View on the worksheet
menubar) and select view code.

Paste this in the code window.

Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

    Dim myCell As Range
    
    Set myCell = Me.Worksheets("sheet1").Range("a1")
    
    If myCell = True Then
        'do nothing
    Else
        MsgBox "They don't match"
        Cancel = True 'if you want to stop the save!
    End If

End Sub

"NG_Leeds <" wrote:
> 
> I want to put an error warning in to a s/s. I have a formula with a cell
> AX=TX returning a true or false value, if the value is false, I wish to
> have an error message occur to alert the user that the values are not
> the same, either on occurrence or before saving ideally.
> Is this possible?
> If so how?
> Thank you.
> 
> ---
> Message posted from http://www.ExcelForum.com/

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
7/16/2004 10:38:57 PM
Reply:

Similar Artilces: