ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trigger Macro on Cell select (https://www.excelbanter.com/excel-programming/367989-trigger-macro-cell-select.html)

[email protected]

Trigger Macro on Cell select
 
Ok, easy question for you guys... I've programed a script in the VB
editor, and need it triggered everytime a certain cell gets activated.
any suggestions?


Die_Another_Day

Trigger Macro on Cell select
 
Open Workbook
Press Alt+F11
On the Left side of the screen should be a VBAProject(YourWorkbook)
Double-Click to expand
Double-Click the Sheet with the cell of interest
At the top of the main screen are 2 comboboxes,
in the left one select "Worksheet"
in the right one select "Change"
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Should
appear
Add this before the "end sub":
If Not Target = Range("A1") Then Exit Sub 'Change A1 to your
"certain cell"
'Your Code

HTH

Die_Another_Day

wrote:
Ok, easy question for you guys... I've programed a script in the VB
editor, and need it triggered everytime a certain cell gets activated.
any suggestions?




All times are GMT +1. The time now is 04:23 AM.

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