ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   user event driven macro issue (https://www.excelbanter.com/excel-programming/277441-re-user-event-driven-macro-issue.html)

Jean-Paul Viel

user event driven macro issue
 
Hi,



There is no event as such but you could do something like that:



Far away on your sheet name a cell like abc end then add the following code
to the module of that sheet:



Private strPlace As String

Private Sub Worksheet_Activate()

strPlace = Range("abc").Address

End Sub





Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Range("abc").Address < strPlace Then



'do some code



strPlace = Range("abc").Address

End If

End Sub






--
JP

http://www.solutionsvba.com


"Dima K." wrote in message
...
I was wondering if it's possible to use an event such as a
user inserting a row in one worksheet to start a
macro/module automatically? thanks for any help and
example code.





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

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