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: 10
Default HELP! Reading range into array

Hi,

I've been working on some code, which seems to have stopped working
for reasons which are beyond me. I'm trying to read a range from the
worksheet into an array using the code:-

interpArray = Worksheets(sheetName(j)).Range(Cells(row1, col1),
Cells(row2, col2)).Value

This is pulling up a Run-time Error 1004 "Application-defined or
object-defined error". If I hard code in the array i.e.

interpArray = Worksheets(sheetName(j)).Range(Cells("a6:o22").Val ue

then it works fine, but I need to be able to move down the sheet as
the macro loops through, as I need a different range to be read with
each loop of the array.

Can anyone help me work out how to fix this?

Thanks in advance!
Kate

 
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
Reading to a 1-D array...Error shishi Excel Programming 9 August 9th 05 09:19 PM
Reading a Range to an Array Kevin H. Stecyk[_2_] Excel Programming 6 January 26th 05 11:01 PM
Reading a VBA Array - Thanks SMS - John Howard Excel Programming 0 October 30th 04 11:35 PM
Reading .csv file into array mousetrap Excel Programming 1 November 26th 03 07:47 AM
Reading a cell into an array Tick-Tock Excel Programming 2 September 11th 03 07:33 PM


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