VBA advanced Function not executed when inserted by Macro

Barbatian

New Member
Joined
Sep 12, 2014
Messages
25
Dear All,

I couldn't find related topic but probably I didn't search right words.
Nevertheless I need to ask for help.

I have an "advanced" / "non-standard" function, which is called "abc" and workes as follows:
=abc("Name","Value","Number of Periods","Period Type")
What it does, it returns Values assigned to specific Name for specific period/periods in the past.
If I type:
=abc("Apple","Last Price","3","day") in cell "A1" it will return Last Prices of Apple from past 3 days:
A1 = 18.02.2018 B1 = 100 (fake price)
A2 = 17.02.2018 B2 = 101 (fake price)
A3 = 16.02.2018 B3 = 102 (fake price)

a function itself will be only in cell A1.
What it does, it connects to "data base" on server and collects data based on arguments given in "formula"/"function" and returns.

Now the problem is when I have a Macro, which inserts "abc" function, the function is not executed until I pause/stop/finish the Macro.
How Can I enable executing the "abc" function before going to next line of code in a separate Macro?

I would be very glad if you could help me

Best Regards,
Barb
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Have you tried inserting the vba command Calculate immediately after putting the function in the cells?
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,128
Members
448,947
Latest member
test111

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