Thread: Saving an array
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Saving an array

Ken,

Instead of

...... = arrCtrl

use

...... = Application.Transpose(arrCtrl)

HTH,
Bernie
MS Excel MVP

"Ken McLennan" wrote in message
.. .
G'day there again,

I've just found a smallish problem that I can't figure out. I'm
trying to save an array of strings to a range.

I've got the correct data loaded into the array, and I'm using
this statement to save it:

Worksheets("Data").Range("SavedShifts").Value = arrCtrl

"SavedShifts" *IS* a named range on the "Data" sheet. However all
I get is the data from arrCtrl(0) saved into each cell.

A debug.print statement shows me that the data in arrCtrl is
correct, but it's only saving a single value across the range.

I'm sure it's something simple, but it escapes me completely.

Any ideas, anyone?

Thanks once more
Ken McLennan
Qld, Australia