ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Continually check if condition is true in VBA (https://www.excelbanter.com/excel-discussion-misc-queries/112816-continually-check-if-condition-true-vba.html)

[email protected]

Continually check if condition is true in VBA
 
Hi,

I have a simple question, but can't figure it out. I want a macro to
one immediately if a certain cell is selected. The way I'm doing it is
checking ActiveCell.Row and ActiveCell.Column and if those match the
cell I want, the macro runs.

However, how do I set this to check every time a new cell is selected?

Thanks!

Brett


Gary''s Student

Continually check if condition is true in VBA
 
Yes:

Use an event macro:
the Worksheet selection change event macro

See
http://cpearson.com/excel/events.htm
for background into
--
Gary's Student


" wrote:

Hi,

I have a simple question, but can't figure it out. I want a macro to
one immediately if a certain cell is selected. The way I'm doing it is
checking ActiveCell.Row and ActiveCell.Column and if those match the
cell I want, the macro runs.

However, how do I set this to check every time a new cell is selected?

Thanks!

Brett




All times are GMT +1. The time now is 06:40 PM.

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