Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using Excel 2000. I have a spreadsheet where a user enters numbers for
debits and credits. I'd like to have a popup appear when the user enters a value incorrectly - ie, debits have to be entered as a positive number, credits have to be negative. Also, is there a way to erase or undo the previous entry? I'm thinking the worksheet_change event is needed here, but what I've tried doesn't seem to work: Private Sub Worksheet_Change(ByVal Target As Range) if ActiveCell.Offset(0, -1).Value = "Debit" and Range("ActiveCell.Value <1 Then MsgBox "The number entered needs to be positive" Elseif ActiveCell.Offset(0, -1).Value = "Credit" and Range("ActiveCell.Value 1 Then MsgBox "The number entered needs to be negative" End If End Sub Thanks for any and all help. -- Craig |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Showing known cell reference in a popup | Excel Worksheet Functions | |||
Automating change via popup to a column of numbers | Excel Worksheet Functions | |||
User entry in cell creates popup | Excel Discussion (Misc queries) | |||
If values are'nt entered in cell a popup window comes up?? | Excel Worksheet Functions | |||
How do I create a popup window based on a cell value? | Excel Discussion (Misc queries) |