Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default run macro on cell entry

i want a macro to run after a number (any number) has been entered into a
cell i.e a2

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default run macro on cell entry


In the VBE window, right click the sheet and view code. Change "(General)"
to "Worksheet" in the top left drop down box, and choose "Change" in the top
right.

Yopu should see:

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

In the main window. Between these two lines put this:

If Target.Address = "$A$2" And WorksheetFunction.IsNumber(Target.Value) =
True Then Call YourMacro()


Changing "YourMacro()" to the relevant macro.

"sleemo" wrote:

i want a macro to run after a number (any number) has been entered into a
cell i.e a2

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default run macro on cell entry

thanks
i just had to add end if and worked great

"sleemo" wrote:

i want a macro to run after a number (any number) has been entered into a
cell i.e a2

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
Running a macro when there is a given cell entry [email protected] Excel Programming 2 November 1st 06 01:19 PM
Macro Run on Cell Entry Michael Excel Dude Excel Discussion (Misc queries) 2 September 1st 06 01:53 PM
Macro to copy text upon entry into cell RAP Excel Programming 1 August 12th 05 08:49 AM
Macro to force cell entry before running Chance224 Excel Programming 4 April 25th 05 08:31 PM
Macro execution linked to cell entry brockvilleal Excel Programming 0 September 29th 03 06:54 PM


All times are GMT +1. The time now is 09:48 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"