Saving an array

  • Thread starter Thread starter Ken McLennan
  • Start date Start date
K

Ken McLennan

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
 
Ken,

Instead of

...... = arrCtrl

use

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

HTH,
Bernie
MS Excel MVP
 
G'day there Bernie,
Instead of

..... = arrCtrl

use

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

Thanks for that. I had to use
Application.Worksheetfunctions.Transpose, but it worked like a charm.

Thanks once again,
Ken McLennan
Qld, Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top