Monday 15 February 2010

Excel VBA function works in Visual Basic, but fails in Worksheet -


I am trying to create a data array using "CurrentRegion".

  function process data () dim data list () data list = range ("A1"). Work on current data 'Let's Function'   

When I check it in Visual Basic (Run / F5), it works very well; There is no problem with my data list. However, if I set a cell in my worksheet:

   

The function silently fails in the "CurrentRegion" phase. Why does this happen If you call a function call from an Excel cell (such as user-defined-function / UDF), you can access the functions assigned to the categories through parameters. Any access to other categories (and .CurrentRegion is a limit) will result in the "possible circular of cancellation of execution".

In addition, in the UDF you can not modify anything on the worksheet - but the result of the function is only back!

For more information, see this.

No comments:

Post a Comment