still can't assign MACRO

  • Thread starter Thread starter grin2000
  • Start date Start date
G

grin2000

I have an imput box in cell F73. The only things that can be imputte
inside that cell is a dollar amount.

I want a macro to run only after someone has entered a number in tha
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 butto
next to the cell to click once an amount has been imputted?

Thanks, I appreciate the help.

Re: Pressing "Enter" to run macro

even better. It can be automatic
right click sheet tab>view code>copy/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
(e-mail address removed) Re: 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
 
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
news:[email protected]...
 
where in the macro do I have it call my macro after the amount i
inputted
 

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