ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet_Change and Workbook_SheetChange not firing (https://www.excelbanter.com/excel-programming/308806-worksheet_change-workbook_sheetchange-not-firing.html)

David Jenkins[_2_]

Worksheet_Change and Workbook_SheetChange not firing
 
Hi,

I have 2 workbooks, WB1 and WB2. WB1 contains a link to
WB2, e.g., A1 on sheet1 in WB1 is linked to A1 on sheet1
in WB2. I would like to run some code when the cell WB1.A1
changes as a result of WB2.A1 changing, but neither of the
events mentioned fire when A1 in WB2 changes, even tho the
value in WB1 does change. VBA Help, under "SheetChange
Event" says "Occurs when cells in any worksheet are
changed by the user or by an external link." I would have
thought this qualifies as "an external link", but maybe
not? Anyway, if anyone can tell me how to make this work,
I'd appreciate it.

Thanks in advance

David Jenkins

Frank Kabel

Worksheet_Change and Workbook_SheetChange not firing
 
Hi
use the worksheet_calculate event in this case

--
Regards
Frank Kabel
Frankfurt, Germany


David Jenkins wrote:
Hi,

I have 2 workbooks, WB1 and WB2. WB1 contains a link to
WB2, e.g., A1 on sheet1 in WB1 is linked to A1 on sheet1
in WB2. I would like to run some code when the cell WB1.A1
changes as a result of WB2.A1 changing, but neither of the
events mentioned fire when A1 in WB2 changes, even tho the
value in WB1 does change. VBA Help, under "SheetChange
Event" says "Occurs when cells in any worksheet are
changed by the user or by an external link." I would have
thought this qualifies as "an external link", but maybe
not? Anyway, if anyone can tell me how to make this work,
I'd appreciate it.

Thanks in advance

David Jenkins


David Jenkins[_2_]

Worksheet_Change and Workbook_SheetChange not firing
 
Hi,

Thank you, that does trap the event, but it doesn't
provide a "Target" parameter as worksheet_change does,
which as you know indicates the range that changed. I
need to know which cell changed, because the code I want
to kick off as a result should only be run if a particular
cell has changed. Any ideas?


David Jenkins

-----Original Message-----
Hi
use the worksheet_calculate event in this case

--
Regards
Frank Kabel
Frankfurt, Germany


David Jenkins wrote:
Hi,

I have 2 workbooks, WB1 and WB2. WB1 contains a link to
WB2, e.g., A1 on sheet1 in WB1 is linked to A1 on sheet1
in WB2. I would like to run some code when the cell

WB1.A1
changes as a result of WB2.A1 changing, but neither of

the
events mentioned fire when A1 in WB2 changes, even tho

the
value in WB1 does change. VBA Help, under "SheetChange
Event" says "Occurs when cells in any worksheet are
changed by the user or by an external link." I would

have
thought this qualifies as "an external link", but maybe
not? Anyway, if anyone can tell me how to make this

work,
I'd appreciate it.

Thanks in advance

David Jenkins

.


Frank Kabel

Worksheet_Change and Workbook_SheetChange not firing
 
Hi
then the only way is to store the old cell values somethee (e.g. static
variables, hidden sheet, etc.9 and compare them after each calculate
event

--
Regards
Frank Kabel
Frankfurt, Germany


David Jenkins wrote:
Hi,

Thank you, that does trap the event, but it doesn't
provide a "Target" parameter as worksheet_change does,
which as you know indicates the range that changed. I
need to know which cell changed, because the code I want
to kick off as a result should only be run if a particular
cell has changed. Any ideas?


David Jenkins

-----Original Message-----
Hi
use the worksheet_calculate event in this case

--
Regards
Frank Kabel
Frankfurt, Germany


David Jenkins wrote:
Hi,

I have 2 workbooks, WB1 and WB2. WB1 contains a link to
WB2, e.g., A1 on sheet1 in WB1 is linked to A1 on sheet1
in WB2. I would like to run some code when the cell WB1.A1
changes as a result of WB2.A1 changing, but neither of the
events mentioned fire when A1 in WB2 changes, even tho the
value in WB1 does change. VBA Help, under "SheetChange
Event" says "Occurs when cells in any worksheet are
changed by the user or by an external link." I would have
thought this qualifies as "an external link", but maybe
not? Anyway, if anyone can tell me how to make this work,
I'd appreciate it.

Thanks in advance

David Jenkins

.



David Jenkins[_2_]

Worksheet_Change and Workbook_SheetChange not firing
 
Yep, that's what I was thinking. Thanks again.

David Jenkins

-----Original Message-----
Hi
then the only way is to store the old cell values

somethee (e.g. static
variables, hidden sheet, etc.9 and compare them after

each calculate
event

--
Regards
Frank Kabel
Frankfurt, Germany


David Jenkins wrote:
Hi,

Thank you, that does trap the event, but it doesn't
provide a "Target" parameter as worksheet_change does,
which as you know indicates the range that changed. I
need to know which cell changed, because the code I want
to kick off as a result should only be run if a

particular
cell has changed. Any ideas?


David Jenkins

-----Original Message-----
Hi
use the worksheet_calculate event in this case

--
Regards
Frank Kabel
Frankfurt, Germany


David Jenkins wrote:
Hi,

I have 2 workbooks, WB1 and WB2. WB1 contains a link

to
WB2, e.g., A1 on sheet1 in WB1 is linked to A1 on

sheet1
in WB2. I would like to run some code when the cell

WB1.A1
changes as a result of WB2.A1 changing, but neither

of the
events mentioned fire when A1 in WB2 changes, even

tho the
value in WB1 does change. VBA Help,

under "SheetChange
Event" says "Occurs when cells in any worksheet are
changed by the user or by an external link." I would

have
thought this qualifies as "an external link", but

maybe
not? Anyway, if anyone can tell me how to make this

work,
I'd appreciate it.

Thanks in advance

David Jenkins
.


.



All times are GMT +1. The time now is 09:32 AM.

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