#1   Report Post  
Posted to microsoft.public.excel.misc
nonshedders
 
Posts: n/a
Default Macro on exit cell


G'day Everyone,

This may be simple, but it has this basic user flummoxed: how do I set
up a cell so that, once data is entered and the cell is exited, a macro
is performed using the data?

cheers,

nonshedders


--
nonshedders
------------------------------------------------------------------------
nonshedders's Profile: http://www.excelforum.com/member.php...o&userid=33397
View this thread: http://www.excelforum.com/showthread...hreadid=532203

  #2   Report Post  
Posted to microsoft.public.excel.misc
Otto Moehrbach
 
Posts: n/a
Default Macro on exit cell

Do you mean how is a macro executed when data is entered into a specific
cell? How do you want the exiting of the cell to play into this? To
execute a macro when data is entered into a specific cell, you would use a
Worksheet_Change macro like the following. I chose F3 as the specific cell
and a macro named TheMacro as the macro you want executed..
Note that, as written, TheMacro will fire if data is entered only in F3. If
you want TheMacro executed when data is entered into any cell in a range of
cells, then the macro below will have to be changed to reflect that and you
might need to pass the cell address and /or cell value to TheMacro when you
call it. Post back if you need more. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
If Target.Address(0, 0) = "F3" Then Call TheMacro
End Sub
"nonshedders"
wrote in message
...

G'day Everyone,

This may be simple, but it has this basic user flummoxed: how do I set
up a cell so that, once data is entered and the cell is exited, a macro
is performed using the data?

cheers,

nonshedders


--
nonshedders
------------------------------------------------------------------------
nonshedders's Profile:
http://www.excelforum.com/member.php...o&userid=33397
View this thread: http://www.excelforum.com/showthread...hreadid=532203



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
resetting last cell jagdish.eashwar Excel Discussion (Misc queries) 11 March 31st 06 02:06 AM
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
Row Expansion Susan Excel Worksheet Functions 11 February 28th 06 07:15 PM
run a macro in a locked cell Ray Excel Discussion (Misc queries) 8 January 10th 06 12:02 AM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM


All times are GMT +1. The time now is 11:18 PM.

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"