Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Easy Array Question...

This will work:

Sub test()

Dim arr
Dim iCount As Integer

iCount = 100

ReDim arr(iCount) As Integer

End Sub


RBS

"Jeff Harbin" wrote in message
...
I've got an range of cells of varying size made up of predominately

doubles
with a few strings sprinkled amongst the doubles. I need to sort through

the
array, determine the number of doubles in the array, and then populate an
array with the doubles.

I thought I could loop through the cells count the number of doubles,

store
the number of doubles as a variable (iFinalCount), and then Dim an Array
using the iFinalCount variable like so...

Dim DataArray(1 to iFinalCount) as Double

When I try to run the code I get the following error:

Compile Error
Constant Expression required

If I hit Debug it takes me to the iFinalCount in the Array dimensioning
statement.

Btw...iFinalCount is defined as an integer

Thanks,

Jeff


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
Easy question Excel Wired Excel Discussion (Misc queries) 2 July 29th 09 04:53 PM
Easy Question Bob[_8_] Excel Worksheet Functions 9 July 14th 07 03:50 PM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
Easy Array Question... Alan Beban[_2_] Excel Programming 3 August 20th 04 12:15 AM
Easy Array Question... Tom Ogilvy Excel Programming 0 August 19th 04 07:37 PM


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