Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel macro - macro initiation upon hitting the ener key

(a) how can i get a macro activated automatically when the enter key i
hit in a partcular cell, say a1.

(b) how can i get a macro activated automatically when a particula
value (abc) is entered in a particular cell (a1) and then the enter ke
is hit

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default excel macro - macro initiation upon hitting the ener key

Hi
use the worksheet_change event for this. See
http://www.cpearson.com/excel/events.htm

In your case use something like
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Application.Intersect(Target, Range("A1")) Is Nothing Then _
Exit Sub
If Target.Cells.Count 1 Then Exit Sub

With Target
If .Value = "" Then
msgbox "Empty cell entered"
elseif .value="abc" then
msgbox "abc entered"
End If
End With
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"arunjoshi " schrieb im
Newsbeitrag ...
(a) how can i get a macro activated automatically when the enter key

is
hit in a partcular cell, say a1.

(b) how can i get a macro activated automatically when a particular
value (abc) is entered in a particular cell (a1) and then the enter

key
is hit.


---
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
Auto link excel date to calander ener S Lodes Excel Worksheet Functions 0 December 19th 07 05:32 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Batch file initiation from Excel macro? Yarroll Excel Discussion (Misc queries) 1 October 13th 06 02:50 PM


All times are GMT +1. The time now is 07:17 PM.

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

About Us

"It's about Microsoft Excel"