View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Run a macro from within a function

This is interesting.

Could you post something that would take care of OP's original question,
which was to call a macro from a formula in C4 that evaluates a yes/no in C3


Gord

On Wed, 14 Jan 2009 02:26:05 -0800, PBezucha
wrote:

Just to prevent misapprehension:

A VBA FUNCTION can call a SUB. The function can be triggered by a change of
an argument, for example just your deciding yes/no (as Boolean variable). The
SUB can take values even from elsewhere, not only from the inner of the
function, but – there is the hell of restriction – it cannot pass any values
other than over this function output.

Remark: You are allowed to place a MsgBox into a function body, where you
can execute your deferred deciding step.

Regards