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: 12
Default Range to an Array doesn't contain values

I am creating an array from a selection on a sheet. My test lines show the
array has the correct rows and columns by looking at X and Y. I put a
breakpoint in the for/next loop to look at each data value but they always
show empty.
Here is the code I'm using:
'Make this workbook active
ThisWorkbook.Activate
ActiveWorkbook.Sheets(2).Activate
'Make cell A1 active
Worksheets(2).Range("A1").Activate
'Select all active cells on sheet
ActiveCell.CurrentRegion.Select
'Send all active cells to vaData array
vaData = Range(ActiveWindow.RangeSelection.Address).Value

'Test lines
Dim x As Long
Dim y As Long
x = UBound(vaData, 1)
y = UBound(vaData, 2)
For rwData = LBound(vaData, 1) To UBound(vaData, 1)
Data = vaData(rwData, 1)
Next


thanks,
Jerry

 
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
paste values from an array to a range Nick_F Excel Programming 4 July 27th 07 05:11 AM
adding range values to array Gary Keramidas Excel Programming 2 March 12th 07 03:59 AM
Store range of values in an array Trevor Shuttleworth Excel Programming 6 November 8th 06 06:37 AM
range values in an array? Mike Excel Programming 3 December 16th 05 04:56 PM
Array of Values from Worksheet Range - What does it 'look' like? Alan Excel Programming 7 July 8th 04 01:06 PM


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