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: 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/

 
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
Defining a Range using Variables Billyruben Excel Discussion (Misc queries) 3 December 2nd 08 06:31 PM
Adding a range with three variables Saul Excel Discussion (Misc queries) 4 July 25th 08 02:21 PM
Problems with Variables Helen Excel Discussion (Misc queries) 3 March 16th 07 01:52 PM
Add up a Dynamic Range with 2 Variables John Excel Worksheet Functions 0 January 15th 05 02:00 PM
Range Variables Daniel[_7_] Excel Programming 1 November 20th 03 05:45 AM


All times are GMT +1. The time now is 10:49 AM.

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"