Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Data exchange between vba and excel

Hi,

I want to implement in vba Excel (ver. 2002) a quite complex algorithm
which needs numerous input variables and gives numerous results.
Furthermore the algorithm has to run on different sets of input variables.

What would be the best way to implement this?

First of all I thought I could just call the vba function in a cell (
via '=DoTheJob()') and push the results via range("something") in the
worksheet. This didn't work at all, since excel seems to block every
writing into the worksheet. Can anybody tell me why? When I use a button
it works fine.
Then I used a change event to trigger my function, but that also didn't
work well. I don`t want to make any changes to the script when I need to
calculate a new set of input variables.

So what I would need is a way to give my function multiple input
variables and get multiple results.

I hope I made clear what I mean.

Thx

Thomas

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Data exchange between vba and excel

Hi Thomas,

Functions in worksheet cells can only return results to the cell(s) that
they occupy. You can make an array function that returns an array of values
to the cells that it has been entered into as an array formula.
Functions can have up to 30 parameters, each of which can be a range
pointing to multiple contiguous cells.

for some tips and examples see
http://www.DecisionModels.com/calcsecretsj.htm


Charles
______________________
Decision Models
The Excel Calculation Site.
www.DecisionModels.com
"Thomas Dufaux" wrote in message
...
Hi,

I want to implement in vba Excel (ver. 2002) a quite complex algorithm
which needs numerous input variables and gives numerous results.
Furthermore the algorithm has to run on different sets of input variables.

What would be the best way to implement this?

First of all I thought I could just call the vba function in a cell (
via '=DoTheJob()') and push the results via range("something") in the
worksheet. This didn't work at all, since excel seems to block every
writing into the worksheet. Can anybody tell me why? When I use a button
it works fine.
Then I used a change event to trigger my function, but that also didn't
work well. I don`t want to make any changes to the script when I need to
calculate a new set of input variables.

So what I would need is a way to give my function multiple input
variables and get multiple results.

I hope I made clear what I mean.

Thx

Thomas



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
Excel spreadsheet and Exchange IAPaMac Setting up and Configuration of Excel 0 November 20th 07 07:56 PM
How do I exchange data between worksheets? TucAO New Users to Excel 2 June 27th 07 11:06 PM
Excel should allow exchange between cells JJB-BBall Excel Worksheet Functions 0 February 21st 06 04:35 PM
exchange data between two files Darius Excel Worksheet Functions 1 May 21st 05 05:31 PM
Dynamic data exchange between two computer on a network with VBA Denis[_5_] Excel Programming 3 February 12th 04 04:41 PM


All times are GMT +1. The time now is 04:04 PM.

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"