Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Changing a Parameter Of A Formula

Hi,

I would be grateful if someone could help me with the problem have got.

I have written a macro, with my user defined functions. One of my user
defined functions is called GetData and it has two parameters Reference and
Last_Value, eg GetData(Reference, Last_Value).

I call GetData by assigning this to a cell like so (which works fine):

Cell.Formula = GetData(Reference, Last_Value)

Now within the GetData function I use the Reference Parameter to get a New
Value, which will be returned to the cell (which works fine too). But what I
wanted to know is how can I change the Last_Value Parameter to the new Value
I have, which also change Last_Value which is assigned to cell while I'm
still in the GetData function.

Thanks

Sunnous
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Changing a Parameter Of A Formula

A user defined function cannot change other cells in the workbook.

You might want to hook the Calculate event or onchange for the reference
cell.


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Sunnous" wrote in message
...
Hi,

I would be grateful if someone could help me with the problem have got.

I have written a macro, with my user defined functions. One of my user
defined functions is called GetData and it has two parameters Reference
and
Last_Value, eg GetData(Reference, Last_Value).

I call GetData by assigning this to a cell like so (which works fine):

Cell.Formula = GetData(Reference, Last_Value)

Now within the GetData function I use the Reference Parameter to get a New
Value, which will be returned to the cell (which works fine too). But
what I
wanted to know is how can I change the Last_Value Parameter to the new
Value
I have, which also change Last_Value which is assigned to cell while I'm
still in the GetData function.

Thanks

Sunnous



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
Help with parameter substitution in formula (&value), vbScript circuit_breaker Excel Worksheet Functions 1 September 10th 09 03:02 PM
How to choose if I use a parameter or not in a parameter query Arnaud Excel Discussion (Misc queries) 0 March 8th 07 01:19 PM
Replaceable parameter in formula Laramie Excel Worksheet Functions 2 June 10th 05 05:01 PM
Changing a Parameter Of A Formula Sunnous Excel Worksheet Functions 2 October 28th 04 08:33 PM
Changing a Parameter Of A Formula Sunnous Excel Worksheet Functions 1 October 28th 04 03:29 PM


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