Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-15-2012, 08:07 AM
JDevsFan JDevsFan is offline re-naming arrays in VBA? Windows 7 64bit re-naming arrays in VBA? Office 2010 64bit
Novice
re-naming arrays in VBA?
 
Join Date: Mar 2012
Posts: 3
JDevsFan is on a distinguished road
Exclamation re-naming arrays in VBA?

I have two arrays, identicle in dimensions, identicle in size, exact same code pulling the data out of the arrays. The only difference is the amount of data in each and the data stored which does not matter. I want to create a loop that changes which array I am referencing in the VBA code each time through the loop. This will prevent an entire new section of code with the EXACT same code from the first array. I have attempted a few things but it appears you cannot set a variable to store a name and then use that name to access the data. Any thoughts... below is an quick example



Code:
 
dataL(50,50), dataF(50,50)
 
for i = 1 to # of arrays needed
 
   if i = 1 then
          arrayV = dataL
   else
          arrayV = dataF
    end if
 
         value = arrayV(1,1)
next i
so on so forth. That is a simple version of what I am trying to do, it is more detailed than that.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Naming a cell then linking with a certain amount of charachters looses content. shabbaranks Excel 1 12-27-2011 01:06 AM
Auto file naming Rong Peng Word VBA 0 07-29-2011 07:37 AM
Auto-File Naming/ Default Directory Saves sgill32 Word 2 11-06-2008 02:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft