seems like a dumb question even for a VBA newbie, but I can't figure out how to write to a cell in VBA... I have a function in "Module1" that looks like this:
Function Foo(bar As Boolean)
Range("A1").Value = 1
Foo = ...
End Function
Then say I set Cell A2's formula to:
=Foo(true)
The call itself works if I take out the range setting line... in that case setting the calling cell to the foo value. But I'd like this to eventually write a ton of cells at once rather than have a different function call for each cell. What am I doing wrong???
If this code should work as is... are there settings in Excel 2007 that might be blocking editing a cell, or something like that?