Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Callback for a cell changing with less code

Hi,

Is there a way to have a callback that fires when a cell changes value
but w/o a Worksheet_Change for each worksheet. Sort of a global
callback.

I haven't done VBA programming in a couple years (can fight the
withdrawl no longer) and I seem to recall that there's a way to create
an object or something like that for this purpose. For example, in my
old code I'm seeing this "app_SheetSelectionChange" code. No longer
sure how it works, but something like that...

Thanks!

Aaron Fude

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Callback for a cell changing with less code

Aaron,
There is the Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range).
So you get the sheet and range.

If you to further, there's also Application_SheetSelectionChange(ByVal Sh As
Object, ByVal Target As Range).
http://www.cpearson.com/excel/AppEvent.htm

NickHK

wrote in message
oups.com...
Hi,

Is there a way to have a callback that fires when a cell changes value
but w/o a Worksheet_Change for each worksheet. Sort of a global
callback.

I haven't done VBA programming in a couple years (can fight the
withdrawl no longer) and I seem to recall that there's a way to create
an object or something like that for this purpose. For example, in my
old code I'm seeing this "app_SheetSelectionChange" code. No longer
sure how it works, but something like that...

Thanks!

Aaron Fude



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Callback for a cell changing with less code

You mean

Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range).


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"NickHK" wrote in message
...
Aaron,
There is the Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal

Target
As Range).
So you get the sheet and range.

If you to further, there's also Application_SheetSelectionChange(ByVal Sh

As
Object, ByVal Target As Range).
http://www.cpearson.com/excel/AppEvent.htm

NickHK

wrote in message
oups.com...
Hi,

Is there a way to have a callback that fires when a cell changes value
but w/o a Worksheet_Change for each worksheet. Sort of a global
callback.

I haven't done VBA programming in a couple years (can fight the
withdrawl no longer) and I seem to recall that there's a way to create
an object or something like that for this purpose. For example, in my
old code I'm seeing this "app_SheetSelectionChange" code. No longer
sure how it works, but something like that...

Thanks!

Aaron Fude





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Callback for a cell changing with less code

Bob,
Well, yes, if the OP is looking for an event when any cell value changes.
But I paid more attention to his "SheetSelectionChange" comment.

Depends which he has in mind.

NickHK

"Bob Phillips" wrote in message
...
You mean

Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range).


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"NickHK" wrote in message
...
Aaron,
There is the Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal

Target
As Range).
So you get the sheet and range.

If you to further, there's also Application_SheetSelectionChange(ByVal

Sh
As
Object, ByVal Target As Range).
http://www.cpearson.com/excel/AppEvent.htm

NickHK

wrote in message
oups.com...
Hi,

Is there a way to have a callback that fires when a cell changes value
but w/o a Worksheet_Change for each worksheet. Sort of a global
callback.

I haven't done VBA programming in a couple years (can fight the
withdrawl no longer) and I seem to recall that there's a way to create
an object or something like that for this purpose. For example, in my
old code I'm seeing this "app_SheetSelectionChange" code. No longer
sure how it works, but something like that...

Thanks!

Aaron Fude







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Callback for a cell changing with less code

Hi Nick,

He did say

.... when a cell changes value but w/o a Worksheet_Change for each worksheet.
Sort of a global callback....

but he did get confused didn't he? <G


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"NickHK" wrote in message
...
Bob,
Well, yes, if the OP is looking for an event when any cell value changes.
But I paid more attention to his "SheetSelectionChange" comment.

Depends which he has in mind.

NickHK

"Bob Phillips" wrote in message
...
You mean

Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range).


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"NickHK" wrote in message
...
Aaron,
There is the Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal

Target
As Range).
So you get the sheet and range.

If you to further, there's also Application_SheetSelectionChange(ByVal

Sh
As
Object, ByVal Target As Range).
http://www.cpearson.com/excel/AppEvent.htm

NickHK

wrote in message
oups.com...
Hi,

Is there a way to have a callback that fires when a cell changes

value
but w/o a Worksheet_Change for each worksheet. Sort of a global
callback.

I haven't done VBA programming in a couple years (can fight the
withdrawl no longer) and I seem to recall that there's a way to

create
an object or something like that for this purpose. For example, in

my
old code I'm seeing this "app_SheetSelectionChange" code. No longer
sure how it works, but something like that...

Thanks!

Aaron Fude









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Excel Discussion (Misc queries) 0 June 29th 09 11:20 AM
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Yuvraj Excel Discussion (Misc queries) 0 June 26th 09 06:01 PM
Problems with callback from DLL invoked from VBA Jag Man Excel Programming 4 May 2nd 04 10:58 PM
Using Excel to handle Com callback procedures Aaron Graham Excel Programming 5 February 5th 04 04:00 PM
RTD Callback and CIS with firewall Marcosia Excel Programming 0 November 26th 03 10:31 AM


All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"