Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Assigning range to array not working

Can someone explain why this isn't working?

Sub Test()
Dim aArray as Variant

Set rng = Range("A1").CurrentRegion.Select
aArray = rng.Value

End Sub

When I break the code I see the following when I highlight
aArray

(on the Set rng, I put arrow of rng and I see: rng = nothing)
(on the rng.Value, I see <Object variable or With block variable not set

I have values in a 51000 x 10 range beginning at "A1"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Assigning range to array not working

Marston wrote:
Can someone explain why this isn't working?

Sub Test()
Dim aArray as Variant

Set rng = Range("A1").CurrentRegion.Select
aArray = rng.Value

End Sub

When I break the code I see the following when I highlight
aArray

(on the Set rng, I put arrow of rng and I see: rng = nothing)
(on the rng.Value, I see <Object variable or With block variable not set

I have values in a 51000 x 10 range beginning at "A1"


Drop the .Select

Alan Beban
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Assigning range to array not working

Thanks Alan -

and please disregard the next message too.....I think I'm back to where I was
yesterday - at least I'm able to write out my arrays now.


Alan Beban wrote in message ...
Marston wrote:
Can someone explain why this isn't working?

Sub Test()
Dim aArray as Variant

Set rng = Range("A1").CurrentRegion.Select
aArray = rng.Value

End Sub

When I break the code I see the following when I highlight
aArray

(on the Set rng, I put arrow of rng and I see: rng = nothing)
(on the rng.Value, I see <Object variable or With block variable not set

I have values in a 51000 x 10 range beginning at "A1"


Drop the .Select

Alan Beban

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
Array Formula Not Working with Range with Formulas [email protected] Excel Discussion (Misc queries) 4 February 1st 06 02:01 PM
Assigning 10x1 array to 2nd collumn of 10x3 array Alan Beban[_2_] Excel Programming 0 July 30th 04 01:38 AM
Assigning 10x1 array to 2nd collumn of 10x3 array Myrna Larson Excel Programming 0 July 29th 04 11:57 PM
Assigning array to range inside Excel Object Jon Peltier Excel Programming 0 April 1st 04 11:14 PM
Assigning Array Values MWE[_16_] Excel Programming 6 January 26th 04 04:35 AM


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