Trying to insert a vector defined in VB into a worksheet, but not working:
Also, is there a different syntax for a 2-dimensional one?:![]()
Please Login or Register to view this content.
Thanks![]()
Please Login or Register to view this content.
Trying to insert a vector defined in VB into a worksheet, but not working:
Also, is there a different syntax for a 2-dimensional one?:![]()
Please Login or Register to view this content.
Thanks![]()
Please Login or Register to view this content.
Last edited by luv2glyd; 01-26-2016 at 03:43 PM.
You either quit or become really good at it. There are no other choices.
Hi luv,
You need to do a:
Range("A1001:A1036").Value = data_vector(2)
for any success.
In your code you have put values into array holes. You need to add the (number) to have a value.
I think the confusion is from thinking that "data_vector" contains a number. It is the name of an array of numbers defined by the address after "data_vector"
Think of it like you have a street called Main. You have mailboxes on Main of 1,2,3. You put values into these like Main(1)=21 and Main(2)=47. Now you ask VBA for the value of "Main". VBA is confused as Main is a street and you need to tell it what address you are wanting.
Hope that all makes sense.
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Unless you have an Option Base 1 statement at the top of your module you would use 35 for a 36 element array.
![]()
Please Login or Register to view this content.
Try using Application.Transpose.
![]()
Please Login or Register to view this content.
If posting code please use code tags, see here.
Great! Thanks everyone for quick replies. Had no idea the first row is row #0.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks