LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default How do I declare a function whose output is an array?

My current workaround to this problem is to declare the function as

Public Function xyz(abc as Range) as Variant
'Code
'klm is an array
xyz = klm
End Function

This works efficiently enough, but I would like to tidy up my code by
eliminating all non-explicit declarations.

Furthermore, can someone tell me what exactly the difference between an
array and a range is? For example, if I declare the function as

Public Function(abc() as Double) as Variant, how will that make a
difference? Is there any advantage of one over the other?

Will functions like Rows.Count or Application.Count work with an array?

Thank you in advance.
 
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
Declare Variables in Array Mike H. Excel Discussion (Misc queries) 2 March 11th 09 12:33 PM
Global array declare Souris Excel Programming 3 August 20th 05 11:38 AM
Array as output of function maca Excel Programming 4 July 15th 05 12:59 PM
UDF, Array function, vertical output Robin Hammond[_2_] Excel Programming 2 September 30th 04 05:23 AM
Declare an Array() ???? Andoni[_23_] Excel Programming 1 August 31st 04 07:12 PM


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

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"