UDF to run application.CalculateFullRebuild

nevergiveup

New Member
Joined
Jun 2, 2011
Messages
43
I am trying to use a UDF (loaded from an add-in) to force the active workbook to execute a application.CalculateFullRebuild. I am aware that the user can simply do a CTRL+ALT+SHIFT+F9. And I am also aware that I can run a sub with one line with
Code:
application.CalculateFullRebuild
or like so:
Code:
Sub calfullrebuild()

Dim thisbook As Workbook
Set thisbook = ThisWorkbook

With thisbook
    .application.CalculateFullRebuild
End With

End Sub

Again, my question is can I write a UDF that does the same thing if so how?

And perhaps this is related, how could I write a UDF that simply called the above sub?

As always many thanks in advance!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,215,916
Messages
6,127,701
Members
449,398
Latest member
m_a_advisoryforall

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