Private Sub Worksheet_Change(ByVal Target As Range)
On error goto ErrHandler
if target.address="$F$73" then
Application.EnableEvents = False
if not isnumeric(Target) then
msgbox "Please Enter a dollar amount"
Target.Clearcontents
end if
end if
ErrHandler:
Application.EnableEvents = True
End Sub
Not sure what criteria you want to enforce to identify a dollar amount.
--
Regards,
Tom Ogilvy
"grin2000 " <<grin2000.188apw
@excelforum-nospam.com wrote in message
...
I have an imput box in cell F73. The only things that can be imputted
inside that cell is a dollar amount.
I want a macro to run only after someone has entered a number in that
cell and right after he/she imputs the amount and presses Enter.
Can this be done in this manner or will I still need to place a button
next to the cell to click once an amount has been imputted?
Thanks, I appreciate the help.
Pressing "Enter" to run macro
even better. It can be automatic
right click sheet tabview codecopy/paste this. Change cell to suit.
Use A
instead of a.
Private Sub Worksheet_Change(ByVal Target As Range)
if target.address="$A$1" then call mymacro
End Sub
--
Don Guillett
SalesAid Software
Pressing "Enter" to run macro
I get a "compiled error" when I try it this way.
Can someone help me please?
I get a "compiled error" when I try it this way.
Can someone help me please?
---
Message posted from http://www.ExcelForum.com/