Refresh Formula Cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I built a macro named Finance that goes into a file (say finance.txt) and get some numbers. The users use that function in cell formulas:

=Finance(1,2,3)

The result returned by this function is something like

3333.33

Which is great. The problem is that the file finance.txt might be changed by the user.
I need a way to force the formula to refresh in case the finance.txt file changes.

I tried to use the Calculate, Refresh and CalculateAll functions without success. The only way I was able to achieve this is by doing this:

Call ActiveWorkheet.Cells.Replace("Finance", "crap")
Call ActiveWorkheet.Cells.Replace("crap", "Finance")

That method causes other bugs and needs to go.

Any suggestions?

Thanks,
C.
 
Hi
try adding the line
Application.volatile
at the beginning of your function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top