LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Sending data back to parameters

In article ,
says...
I agree with you in general. A function should not change anything within its
environment. No Side Effects. That being said, Excel does not keep you from
creating side effects. Not to mention so long as this function is private and


Maybe, you can share an example of a user defined function that can
change which cell is the active cell and/or change contents of
arguments that are other cell references...

If you'd like a 'for instance' how about: In cell B1 I'd like to enter
=JTUDF(A1) and have function change the content of A1 and move the
active cell to J1.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I agree with you in general. A function should not change anything within its
environment. No Side Effects. That being said, Excel does not keep you from
creating side effects. Not to mention so long as this function is private and
not accessible directly through excel, then there should be no problem. My
big question for Patrick would be what is this function supposed to return.
As a guess this is not a function at all but a sub procedure where nothing is
being returned.

I personally ensure that my functions do not create side effects, right down
to ensuring that the acitive cell is not moved... I assume you live by the
same rule and I like your coding discipline...

"Trevor Shuttleworth" wrote:

Patrick

simple answer is no. A function can only return a value, not affect other
cells or formatting ... or the Excel environment in general.

Regards

Trevor


"Patrick" wrote in message
...
Hi every1!!!

Need to know if this can be done. Here is my problem.

Ive created a custum function that takes-in parameters from a few cells on
same row
its being called from.

With those parameters i do some calculations and find what needs to be
found.
So far so good.

Lets say i find the following answer inside this function of mine: 45
Could i then redirect that answer to one of my parameter cell.

Senario:

Columns

L M N AF
0 0 0 (my function is here)


Lets say my funct. says that when L,M,N =0 then M should equal to : 4

Can i asign that 4 to M while still in my function.

Can this be done?

Thx for your help

PAtrick









 
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
sending parameters to a dll... ibbm Excel Discussion (Misc queries) 0 February 20th 08 05:56 PM
Sending a Picture to the back LanceP Excel Worksheet Functions 4 March 19th 07 04:20 PM
Counting number of forwarding and sending back Jaydubs Excel Discussion (Misc queries) 2 June 16th 06 09:26 AM
sending object to the back in excel workbook M Kirwin Excel Discussion (Misc queries) 1 January 12th 06 05:11 AM
Sending variable data to a web site to be computed then brought back to Excel David Excel Programming 0 April 27th 04 09:44 AM


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

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

About Us

"It's about Microsoft Excel"