ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet_Change wont Trigger (https://www.excelbanter.com/excel-programming/308590-worksheet_change-wont-trigger.html)

Scorcel[_2_]

Worksheet_Change wont Trigger
 
I have created this code below.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A1"), Target) Is Nothing Then
If Range("A1").Value Range("A2").Value Then
GetUp
End If
End If
End Sub

It does execute the function GetUp only when I personally
invoked the value to A1, but it doesn't when I get its
value from another cell.

Also, how can I run a macro say every 2 minutes in Excel
VBA?

Any help would be appreciated. Thank you very much.

Frank Kabel

Worksheet_Change wont Trigger
 
Hi
if you have a formula in cell A1 then you need the worksheet_calculate
event.
For your second question: Use the OnTime method. See:
http://www.cpearson.com/excel/ontime.htm

--
Regards
Frank Kabel
Frankfurt, Germany

"Scorcel" schrieb im Newsbeitrag
...
I have created this code below.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A1"), Target) Is Nothing Then
If Range("A1").Value Range("A2").Value Then
GetUp
End If
End If
End Sub

It does execute the function GetUp only when I personally
invoked the value to A1, but it doesn't when I get its
value from another cell.

Also, how can I run a macro say every 2 minutes in Excel
VBA?

Any help would be appreciated. Thank you very much.




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

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