ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Event handling... (https://www.excelbanter.com/excel-programming/321943-event-handling.html)

ALEX

Event handling...
 
Excel Helper

I have a list of names in column A.

What i want is program whereby if I enter a new name at the bottom of the
column, if it is a duplicate (i.e. name appears elsehwere in list) then a
msgbox appears telling em it is a duplicate.

Now I can actauly ahcieve this in VBA but...

I have to actaully execute the macro maually.

How can i get the macro to run automatically i.e. I enter a new name, press
enter, and the macro runs without me clicking a separate button to run it of
pressing F5 etc.

I have tried...

Application.Volatile
Application. OnKey
Application. Onaction

How do I get Excel to run a macro once an event has occurred.

Any insights appreciated...

Alex

Tom Ogilvy

Event handling...
 
Use the WorkSheet Change Event

see Chip Pearson's page on Events

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"Alex" wrote in message
...
Excel Helper

I have a list of names in column A.

What i want is program whereby if I enter a new name at the bottom of the
column, if it is a duplicate (i.e. name appears elsehwere in list) then a
msgbox appears telling em it is a duplicate.

Now I can actauly ahcieve this in VBA but...

I have to actaully execute the macro maually.

How can i get the macro to run automatically i.e. I enter a new name,

press
enter, and the macro runs without me clicking a separate button to run it

of
pressing F5 etc.

I have tried...

Application.Volatile
Application. OnKey
Application. Onaction

How do I get Excel to run a macro once an event has occurred.

Any insights appreciated...

Alex





All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com