Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default piggyback cell from formula function

Hi,
Situation: In every one of a workbook's cells, there is
a formula using a VBA function I created. When a formula
is being recalculated, my function is being called.
Problem: When mass cells recalculation occurs, my
function needs to know from which cell it is being called.
Is there a way for my function to know this?

Thanx
C.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default piggyback cell from formula function

Thanks, worked like a charm.

C.
-----Original Message-----
Application.Caller will return a range reference to the

calling cell (or
cells if it is a multicell array formula).

--
Regards,
Tom Ogilvy

"Conceptor" wrote

in message
...
Hi,
Situation: In every one of a workbook's cells, there

is
a formula using a VBA function I created. When a

formula
is being recalculated, my function is being called.
Problem: When mass cells recalculation occurs, my
function needs to know from which cell it is being

called.
Is there a way for my function to know this?

Thanx
C.



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default piggyback cell from formula function

Well, almost like a charm.

When you use the cell.text property, it works like a
charm, but not in all cases (formatting). When I use the
proper cell.value property, I get error messages
concerning circular references and that Excel cannot
recalculate nor display these circular references. This
error appears only when an automatic recalculation due to
XLA linkage triggers before the workbook_open event.

Any idea what this circular reference message means?
C.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default piggyback cell from formula function

I have never had any problem with circular reference errors unless my UDF
was actually doing a circular reference. I doubt it has anything to do
with application.Caller.

If you are trying to build some kind of running total where a cell adds a
value to its current value, that isn't allowed in regular formulas or in
UDF's - unless you enable iteration.

--
Regards,
Tom Ogilvy

"Conceptor" wrote in message
...
Well, almost like a charm.

When you use the cell.text property, it works like a
charm, but not in all cases (formatting). When I use the
proper cell.value property, I get error messages
concerning circular references and that Excel cannot
recalculate nor display these circular references. This
error appears only when an automatic recalculation due to
XLA linkage triggers before the workbook_open event.

Any idea what this circular reference message means?
C.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default piggyback cell from formula function

Hi again,

Your solution, thought inspired, does not apply to my
case, sadly. This whole problem originated from my
inability to cancel an automatic recalculation, triggered
on workook load, caused when a XLA file is linked to the
XLS workbook. If there could be a way to do so, I would
not be trying to put back the value of the cell into
itself, thus the circular reference. Complicated story.
I guess what I fondamentally need is a way to cancel the
XLA automatic recalculation or to get a Cell_Recalculation
event that would allow me to cancel it. Is there some
object I could reference withevents that would have such
an event? Or is there a way to shut down XLA automatic
load recalculation?


-----Original Message-----
I have never had any problem with circular reference

errors unless my UDF
was actually doing a circular reference. I doubt it has

anything to do
with application.Caller.

If you are trying to build some kind of running total

where a cell adds a
value to its current value, that isn't allowed in regular

formulas or in
UDF's - unless you enable iteration.

--
Regards,
Tom Ogilvy

"Conceptor" wrote

in message
...
Well, almost like a charm.

When you use the cell.text property, it works like a
charm, but not in all cases (formatting). When I use

the
proper cell.value property, I get error messages
concerning circular references and that Excel cannot
recalculate nor display these circular references. This
error appears only when an automatic recalculation due

to
XLA linkage triggers before the workbook_open event.

Any idea what this circular reference message means?
C.



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default piggyback cell from formula function

There is minimal control over calculation.

You can look at Charles Williams site for information on calculation

http://www.decisionmodels.com

Possibly you need to replace the cells with their values when you close the
book/XLA and put the formulas back at the appropriate time after you open
the workbook.

--
Regards,
Tom Ogilvy

Conceptor wrote in message
...
Hi again,

Your solution, thought inspired, does not apply to my
case, sadly. This whole problem originated from my
inability to cancel an automatic recalculation, triggered
on workook load, caused when a XLA file is linked to the
XLS workbook. If there could be a way to do so, I would
not be trying to put back the value of the cell into
itself, thus the circular reference. Complicated story.
I guess what I fondamentally need is a way to cancel the
XLA automatic recalculation or to get a Cell_Recalculation
event that would allow me to cancel it. Is there some
object I could reference withevents that would have such
an event? Or is there a way to shut down XLA automatic
load recalculation?


-----Original Message-----
I have never had any problem with circular reference

errors unless my UDF
was actually doing a circular reference. I doubt it has

anything to do
with application.Caller.

If you are trying to build some kind of running total

where a cell adds a
value to its current value, that isn't allowed in regular

formulas or in
UDF's - unless you enable iteration.

--
Regards,
Tom Ogilvy

"Conceptor" wrote

in message
...
Well, almost like a charm.

When you use the cell.text property, it works like a
charm, but not in all cases (formatting). When I use

the
proper cell.value property, I get error messages
concerning circular references and that Excel cannot
recalculate nor display these circular references. This
error appears only when an automatic recalculation due

to
XLA linkage triggers before the workbook_open event.

Any idea what this circular reference message means?
C.



.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default piggyback cell from formula function

Great idea.

I will try it out. Thanks!
C.


-----Original Message-----
There is minimal control over calculation.

You can look at Charles Williams site for information on

calculation

http://www.decisionmodels.com

Possibly you need to replace the cells with their values

when you close the
book/XLA and put the formulas back at the appropriate

time after you open
the workbook.

--
Regards,
Tom Ogilvy

Conceptor wrote in

message
...
Hi again,

Your solution, thought inspired, does not apply to my
case, sadly. This whole problem originated from my
inability to cancel an automatic recalculation,

triggered
on workook load, caused when a XLA file is linked to the
XLS workbook. If there could be a way to do so, I would
not be trying to put back the value of the cell into
itself, thus the circular reference. Complicated story.
I guess what I fondamentally need is a way to cancel the
XLA automatic recalculation or to get a

Cell_Recalculation
event that would allow me to cancel it. Is there some
object I could reference withevents that would have such
an event? Or is there a way to shut down XLA automatic
load recalculation?


-----Original Message-----
I have never had any problem with circular reference

errors unless my UDF
was actually doing a circular reference. I doubt it

has
anything to do
with application.Caller.

If you are trying to build some kind of running total

where a cell adds a
value to its current value, that isn't allowed in

regular
formulas or in
UDF's - unless you enable iteration.

--
Regards,
Tom Ogilvy

"Conceptor" wrote

in message
...
Well, almost like a charm.

When you use the cell.text property, it works like a
charm, but not in all cases (formatting). When I use

the
proper cell.value property, I get error messages
concerning circular references and that Excel cannot
recalculate nor display these circular references.

This
error appears only when an automatic recalculation

due
to
XLA linkage triggers before the workbook_open event.

Any idea what this circular reference message means?
C.


.



.

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
Piggyback?? ramunlim Excel Discussion (Misc queries) 2 December 19th 08 09:32 PM
CELL Function: cell reference by formula Alex C Excel Worksheet Functions 1 June 19th 06 03:30 PM
A function to indicate whether a cell contains formula or value? Dave T Excel Worksheet Functions 2 June 8th 06 12:11 AM
Need formula or Function to sum value of every other cell in a col Brent Excel Worksheet Functions 2 January 17th 06 08:07 PM
function CELL() to return the formula in the referenced cell Streep Excel Worksheet Functions 3 August 20th 05 10:24 PM


All times are GMT +1. The time now is 03:49 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"