Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default still can't assign MACRO

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.

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default still can't assign MACRO

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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default still can't assign MACRO

where in the macro do I have it call my macro after the amount i
inputted

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default still can't assign MACRO

after it passes the test that it isn't numeric.

--
Regards,
Tom Ogilvy

"grin2000 " wrote in message
...
where in the macro do I have it call my macro after the amount is
inputted?


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign a Macro The Rook[_2_] Excel Discussion (Misc queries) 5 February 19th 07 06:53 PM
Assign Macro David Excel Worksheet Functions 1 October 9th 06 03:31 AM
assign macro PH NEWS Excel Worksheet Functions 2 February 28th 06 02:17 PM
Assign a Macro Pendelfin Excel Discussion (Misc queries) 1 January 10th 06 11:35 PM
How to assign a macro Mike Excel Discussion (Misc queries) 4 July 5th 05 06:43 AM


All times are GMT +1. The time now is 04:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"