Results of an array function referred to another workbook returns ERROR!

stakar

Active Member
Joined
Mar 6, 2004
Messages
333
Hi!!
I have a problem with an array reference.
I m using the morefunc addin for excel and i have a array function the "Hsort" in the workbook 1, which sorts horizontally the cells GM4 to GP4 and it works excellent.
The array function is the following : {=HSORT(GM4:GP4;;1)}

Im referring the results to another workbook 2 BUT with the workbook 1 closed so i get the error #NAME?
I have made a vb6 code that i read everything from the close workbook 1 and i have problem ONLY with this array reference
Every other references works ok except this one.
Can someone help me?

Note, that when the workbook 1 is opened everything works ok!

Thanks in advance
 
Did you update the source workbook using the code you linked to before? If so, that would cause the error.

I just put the part of your code in the above module but it didnt work
Is it easy to you to show me the right code for this problem?
Thanks in advancce
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I repeat, did you previously run the other code on the workbook you are now trying to extract data from? If so, I suspect the workbook actually contains errors, which is why you are getting errors returned.
 
Upvote 0
I repeat, did you previously run the other code on the workbook you are now trying to extract data from? If so, I suspect the workbook actually contains errors, which is why you are getting errors returned.

I just get the part of your code, with the objAddin, and tried to put it to the above code, the right one.
I didnt try the other code at all because it wasnt the one that i wanted to.
 
Upvote 0
If you had not already run that other code on the workbook you are linking to, then I don't know. (I don't use MoreFunc so can't say if that's the issue - it would appear to be).
 
Upvote 0
If you had not already run that other code on the workbook you are linking to, then I don't know. (I don't use MoreFunc so can't say if that's the issue - it would appear to be).

If you have to put the code with the .objAddin, in the second, right code of mine, where did you put it?
The second code that i post here, as you already noticed, is for the opened workbook. I have to put your .objAddin code to this workbook, not to the closed one, right??

If its that so, then can you tell me where to put your code in this module?
 
Upvote 0
You shouldn't need to add anything to the second code you posted since you aren't automating anything.
 
Upvote 0
You shouldn't need to add anything to the second code you posted since you aren't automating anything.

So i have to put this to the first code which is to the closed workbook.
Ok then, i ll try it as soon as i go home and i reply to you
Thank you for being so patience with me!!
 
Upvote 0
Excellent!!
I put the code in the closed workbook and when i open the other workbook it read the code from the closed workbook, so the array reference worked !!!
It was all about the addins property thing, as you told me!
Great!!!
Thanks a lot for your help rorya!
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,176
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top