Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Transferring ranges to/from arrays

Alan,

Yea! Application.Transpose(outArgs) does the trick. Thanks!

Ed

"Alan Beban" wrote in message
...
In my test Module I have the Option Base 1 Statement effective, so the
first line of my code is equivalent to Dim arr(1 to 3); In your Module
you do not have the Option Base 1 Statement effective, so your code is
equivalent to Dim arr(0 to 3).

As to the second point, which also answers your post of 1:24 pm, the
array is one-dimensional and "horizontal"; therefore, to transfer it to
a vertical range you might use

Range("A10:A12").Value = Application.Transpose(arr)

Alan Beban

Jag Man wrote:
Alan,

When I execute your example below I get 0, 1, 2 in the specified range.
Curiously,
if I change the range to "A10:A12" I get 1, 1, 1 in the specified range!

What is going on here, I wonder?


Ed


The following works:

Sub testIt()
Dim arr(3) As Long
arr(1) = 1
arr(2) = 2
arr(3) = 3
Range("A1:C1").Value = arr
End Sub

Alan Beban







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
Formulas in arrays and named ranges Babymech Excel Discussion (Misc queries) 2 July 21st 08 04:16 PM
Ranges and Arrays in Excel VBA a.riva@UCL Excel Worksheet Functions 15 October 27th 07 12:15 AM
comparing ranges/arrays asaylor Excel Worksheet Functions 7 June 13th 06 11:53 PM
Comparing two arrays/ranges SpiderBoy Excel Programming 0 July 25th 03 07:58 PM


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