Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Linking Chart directly to VBA function returning 2d array

Hello,

Can anyone tell me if it's possible to link a chart directly to a VBA
function that returns a 2d array?

I've had a play but had no luck.



Cheers



Damien Sawyer
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Linking Chart directly to VBA function returning 2d array

Damien,


At first I could NOT get it to work...
(I'm NO expert on charts.. but i AM curious and 'creative')


the ADD method (or manually editing the series source would NOT accept
formulas or named formulas..


However I discovered it can be fooled :)


First I defined the name Sheet1!Test = =sheet1!$a$1

I pointed the dataseries to that NAME =Sheet1!test

THEN i changed the names definition to =GetData()
which is the name of my UDF..

Public Function GetData()
'dummy function
GetData = Array(120, 150, 180)
End Function

TADA!!!!!


howeever that's still a 1D array..
please experiment yourself using this approach..


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Damien Sawyer wrote :

Hello,

Can anyone tell me if it's possible to link a chart directly to a VBA
function that returns a 2d array?

I've had a play but had no luck.



Cheers



Damien Sawyer

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
Returning an Array from a called function within a macro [email protected] New Users to Excel 1 May 18th 07 03:47 PM
Returning an array from the INDEX function Agenor Excel Worksheet Functions 2 November 28th 06 12:44 AM
function returning array dreamer[_18_] Excel Programming 1 June 8th 04 10:43 AM
returning an array from a custom function Ron Davis Excel Programming 2 September 15th 03 11:02 AM
Returning single/multiple values from array function Ryan Poth[_2_] Excel Programming 4 July 16th 03 08:06 AM


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