View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sinus Log Sinus Log is offline
external usenet poster
 
Posts: 22
Default How to enter a value in a cell

I've tried this macro and it works:
Sub temp()
Range("Comm!f7").Value = 0
End Sub

But what I need is a function. This one doesn't work, I get
#VALUE!:
Function temp1()
Range("Comm!f7").Value = 0
End Function

And this doesn't work either:
Function temp1()
temp
End Function

There could be another way, a better one, but much too
difficult for me. What I am trying to do is to erase from
memory all the values pertaining to Sheet1, as soon as any
of its cells is modified by the user (the values are
preserved in memory as public arrays). By searching Google,
I found references to Worksheet_Change. Can someone help me
with that too, please ?

Thanks