View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Peter Ostermann[_3_] Peter Ostermann[_3_] is offline
external usenet poster
 
Posts: 37
Default Basic Excel functionality collides with VBA code.


"Vic Eldridge" wrote


focus/cell-reference seems to get lost.


I'm not sure what you mean by the above statement. What exactly is going
wrong ?


It looked like the "Target" was changed exidentially by the function-exec..
I found the cause now:

Set Pos = Application.Caller
Adresse = Application.Caller.Address


That are remains from tests and not necessary in the function.
After I commented it out everything runs ok!

At this point, there's two things I'd try.

Firstly, have a play with Application.Volatile and see if that makes any
difference.


Good hint, stmt. seems to be helpful in every function that is called from
cells.
But in this case it wouldn't have made any difference.


Secondly, you could use a public variable to prevent your function's code
from running


This would have been a solution. Thanks
a lot for assistance.

Best Regards
Peter
PS. By the way another question:
Is it possible to unprotect cells but keep the
"format" (like lines surrounding the cells, etc.)