seems like a dumb question even for VBA beginners, 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 let's say I set the Cell A2 formula:
=Foo(true)
The call itself works if I select the range setting line ... in this case by setting the calling cell to foo. But I would like it to eventually write a ton of cells at once, and not call different functions for each cell. What am I doing wrong?
If this code should work as it is ... are there any settings in Excel 2007 that can block cell editing or something like that?
source
share