Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good afternoon,
I've got a range of cells that I'd like to (whenever one changes) run the VBA code against. I'd like the code to check that the changed cell has a number value (either whole or in increments of 0.25). The cell may be null - that's an acceptible value also. If the cell is not null, nor a positive increment of 0.25, I'd like to automate a msgbox. Then, I'd like the cell to be highlighted (as if it's the activecell with an F2 to edit it) to give the user the opportunity to change the value of the cell. If it's still wrong, I'd like to have it rerun the code. Here's what I have so far, and it does NOTHING (that I can see): Private Sub Worksheet_Change(ByVal Target As Range) If Not Target.Value Then If Target.Value 0 Then If Target.Value < 100 Then End If End If Else: MsgBox "Your cell does not contain a number. Please make the correction." End If End Sub What a) am I doing wrong, and b) do I need to do to complete my code? All help will be greatly appreciated. Thank you! DW |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check if content in cell is an integer | New Users to Excel | |||
Check if content in cell is an integer | New Users to Excel | |||
i have a check box that keeps clearing out my cells content | Excel Worksheet Functions | |||
Check the content of a textbox? | Excel Programming | |||
How to check a cell for content before running macro. | Excel Programming |