ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   INDIRECT.EXT function, PULL function (https://www.excelbanter.com/excel-worksheet-functions/453972-re-indirect-ext-function-pull-function.html)

[email protected]

INDIRECT.EXT function, PULL function
 
Dear Harlan Grove,
Thank you for your amazing work with Pull function (attached)!!

It works very well.
My problem is that it use:
Set xlapp = CreateObject("Excel.Application")

which, from what I understood (I am a beginner), creates each time a new Excel instance which weighs enormously the use of the function. This is a real problem for me because my table easily contains 1000 calls of the Pull() function.

However, a person by the name of Pappu Pager who wrote you gave a track to speed up the processing done by your pull function, here is the quote in question:

This function is slow for only one reason. The Set xlapp = CreateObject(Excel.Application) has been defined in the function, which creates a new object every time a cell is changed.

We need to initialize it only once. So you can just declare public xlapp as object in the module just above the line Function pull(xref As String) As Variant
And
PUT THE Set xlapp = CreateObject(Excel.Application) within workbook_open event under THISWORKBOOK. Believe me it works awesome. I have tried it and pulled 100 rows each from 20 files in 15 seconds.

I can send you my excel files which are working with awesome speed. Please give me your email id.

Pappu Pager.
(From India that is Bharat)


Did he sent you his files?
If yes, can you PLEASE send them to me too?

If not, and as I do not understand what he explains and I do not know how to put it into practice, I turn to you to know if you would have the extreme kindness of:
- Either modify your code to put into practice the modifications of Pappu Pager so that the macro is faster,
- Or explain me very concretely how to make these modifications so that I can do them myself.

Thank you in advance for any help you can bring me 

Best regards,
Prince


All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com