View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
ROland ROland is offline
external usenet poster
 
Posts: 72
Default Refresh Excel cells on demand

I have come up with two ways good or bad.

if I put Application.Volatile in the function it does get call each time.

function ExternalData(dataSource)
Application.Volatile
....
end function


The other way
placed a button on the sheet

sub buttonClick()
me.Range("cellChange").value = "change"
end sub

This cause the function to fire also

function ExternalData(dataSource,cellChange)
....
end function

--
Roland


"Roland" wrote:

I would like to add a button or a menu pick to Excel asking it to refresh all
cells which referances a user defined function in an Add-in.

For example:

Cells
a1
=ExternalData("source1")

a2
=ExternalData("source2")
...

After button click ExternalData should refresh its data.

Any help would be great!

Thanks

Roland