View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default passing cell address to sub - write that cell

wrote:
What am I doing wrong?
function xx (x as range) as whatever
x.value2 = "test"
or
x.text = "test"

[....]
Entered function in cell as xx(B5)


When VBA code is invoked directly or indirectly from a formula in an Excel,
the VBA code cannot modify cells directly.