Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Deleting Specific Dimensions of a 3D Array

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ExcelMonkey - 23 Feb 2006 11:35 GMT
Is it possible to erase specific dimensions of an array while a routine is
running to increase the performance of the routine?  Lets say I have a 3D
Array:

Redim 3DArray (0 to 10000, 0 to 300, 0 to 50)

Let say I populate with three For Next Loops:

For X = 1 to 50
  For Y = 1 to 300
      For Z = 1 to 10000
         3DArray(Z,T,X) = Rnd()
      Next
 Next
'Lets say I want to delete the all the data associated with X = 1 when
'the loop progresses to X = 2, and continue to do this
Next
Tom Ogilvy - 23 Feb 2006 13:19 GMT
For X = 1 to 50
  For Y = 1 to 300
      For Z = 1 to 10000
         3DArray(Z,T,X) = Rnd()
         if X > 1 then _
          3DArray(Z,T,X-1) = empty ' or 0
      Next
 Next
Next

Signature

Regards,
Tom Ogilvy

> Is it possible to erase specific dimensions of an array while a routine is
> running to increase the performance of the routine?  Lets say I have a 3D
[quoted text clipped - 13 lines]
> 'the loop progresses to X = 2, and continue to do this
> Next
ExcelMonkey - 23 Feb 2006 13:57 GMT
Does deleting data from the 3rd dimension free up memory to speed up the
routine?  Or would I have to redimension the array to see the affects on
performance?

> For X = 1 to 50
>    For Y = 1 to 300
[quoted text clipped - 23 lines]
> > 'the loop progresses to X = 2, and continue to do this
> > Next
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.