View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
athuggard athuggard is offline
external usenet poster
 
Posts: 1
Default Variables and range problems

Hi all. I am having a problem defining a variable size range of cells
that I am trying to get into a array. Mulitple problems here. First
off, the range statement gives me a "run time error 1004", "application
or object defined error". Secondly, the method I am trying to use to
get a varible data set (range) into my array doesn't work. Is there a
better way?

Running Excel 2002 SP-2 on WinXP SP-1

Thanks in advance.

-Adam


Dim excelApp As Excel.Application
Dim wbkObj As Workbook
Dim sht_Orch_Obj As Worksheet
Dim OrchRows As Integer
Dim Orch() As Variant
...

Private Sub Get_Orch()
ReDim Orch(OrchRows, 14)
Dim RangeV As Range
Dim OrchRows_Plus As Integer
OrchRows_Plus = OrchRows + 8
Set RangeV = Range("A9:N" & OrchRows_Plus)
Orch = sht_Orch_Obj.Range(RangeV)
End Sub


---
Message posted from http://www.ExcelForum.com/