Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Saving an array

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Saving an array

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
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
Automaticly saving formula's to values when saving Gunti Excel Discussion (Misc queries) 8 November 11th 08 09:34 AM
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Saving a Workbook: Forcing User to Rename before Saving Rollin_Again[_6_] Excel Programming 5 April 16th 04 02:54 PM
variant array containing cel adresses convert to actual ranges-array Peter[_21_] Excel Programming 5 December 10th 03 09:50 PM


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