View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default array data type issues -

On Tuesday, December 9, 2014 2:42:41 PM UTC-7, GS wrote:
typo...

TempVal = Application.Index(TempArr, i + 1)
This line requires both dims because TempArr is same as
UBound(MyArr) rows-wise, with 1 col for 2nd dim! This throws the
error for the next


line, and so try...

TempVal = TempArr(i, 1)

..since your counter now starts at 1 (LBound(TempArr))!


--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


the TempVal = Application.Index(TempArr, i + 1) line was my problem.
I don't know why i was trying to access the element in wanted via
index in an array - i am trying to convert to arrays to i can use
array syntax to make life easier/faster. DUH! haha. thanks for the
help.


Glad to help where I can!

I was focussed on your statement from the other post...

"so i'm trying to teach myself how to do data manipulations in arrays
instead of in the excel cells directly"

...where I also posted a download link to some samples I'm working on.
(They are still considered 'work-in-progress' as yet!)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion