Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dim an Array with a variable


I need to dim a variable as an array, but I dont know how big to make it
until I found out how much information I will put in it.


..FoundFiles.Count tells me how many values I want to put in the array
but

If I try this I get an error


Dim Maps(1 To .FoundFiles.Count) As String


Is there another way?


--
icdoo
------------------------------------------------------------------------
icdoo's Profile: http://www.excelforum.com/member.php...o&userid=27342
View this thread: http://www.excelforum.com/showthread...hreadid=501347

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Dim an Array with a variable

Dim Maps

.. do the Findfile

Redim Maps ( 1 To .FoundFiles.Count)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"icdoo" wrote in
message ...

I need to dim a variable as an array, but I dont know how big to make it
until I found out how much information I will put in it.


FoundFiles.Count tells me how many values I want to put in the array
but

If I try this I get an error


Dim Maps(1 To .FoundFiles.Count) As String


Is there another way?


--
icdoo
------------------------------------------------------------------------
icdoo's Profile:

http://www.excelforum.com/member.php...o&userid=27342
View this thread: http://www.excelforum.com/showthread...hreadid=501347



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Dim an Array with a variable

Start with
Dim Maps()
and then use ReDim in your procedure once you've determined the size you
need.

Steve


"icdoo" wrote in
message ...

I need to dim a variable as an array, but I dont know how big to make it
until I found out how much information I will put in it.


.FoundFiles.Count tells me how many values I want to put in the array
but

If I try this I get an error


Dim Maps(1 To .FoundFiles.Count) As String


Is there another way?


--
icdoo
------------------------------------------------------------------------
icdoo's Profile:
http://www.excelforum.com/member.php...o&userid=27342
View this thread: http://www.excelforum.com/showthread...hreadid=501347



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
2D variable array Rbp9ad[_2_] Excel Programming 1 November 29th 05 04:36 PM
Array & variable David Excel Programming 5 March 22nd 05 09:49 AM
how can I see if an array contain a certain variable? Ronaldo[_2_] Excel Programming 3 November 17th 04 09:21 AM
about ARRAY variable Marek Excel Programming 3 September 13th 04 06:40 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


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