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: 30
Default Array <--- Range

If Test is defined as a contiguous three-cell column, this macro works:

Sub Foo()
Dim rngTest As Range, saTest() As String

Set rngTest = ThisWorkbook.Names("Test").RefersToRange
ReDim saTest(1 To 3, 1)

saTest(1, 1) = "a"
saTest(2, 1) = "b"
saTest(3, 1) = "c"

rngTest = saTest
End Sub

The nice thing about this approach is that we can very quickly write data to
the spreadsheet, and without looping.

However, what if we want to go in the other direction? This statement fails:
saTest = rngTest

So, can anyone suggest a way to load an array with values from a
range--without looping?

Thanks.

Charley


 
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
operating over a range in an array ghengis_na'an Excel Discussion (Misc queries) 1 October 7th 09 06:27 PM
How to fix an array or range delboy Excel Discussion (Misc queries) 1 February 12th 08 08:14 PM
Range as array J.E. McGimpsey Excel Programming 1 September 10th 03 11:06 PM
Range as array Chip Pearson Excel Programming 0 September 10th 03 10:40 PM
How Can I copy all value of the array into the range? sjoo Excel Programming 0 August 8th 03 07:30 AM


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