popup message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like a popup message to inform the user that the budgeted value they
entered in a cell is larger than 1.0825 times the old amount. This is for
departments submitting budget for 2007 and there is a cap of 8.25% on
increases. The message box would serve as a reminder to them when they are
going over the budget limits.
 
The specs could be more complete, but you can start with the
following. It assumes the budgeted amount is entered in cell B2 and
the prior year's amount is in cell A2. Maybe you need to use
Target.Column or Target.Row in place of Target.Address. Put this in
the worksheet's code module.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$2" Then
If Target > 1.0825 * Range("A2") Then
MsgBox "Amount entered may not exceed 1.0825 times prior
year's budget."
Target = ""
End If
End If
End Sub

Hth,
Merjet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top