VBA How do I set a value in a cell?
This gave me "Compile error: sub or Function not defined".
Public Function go() As String
Sheet("Sheet1").Range("M5").Value = "hello"
End Function
I have also tried:
Public Function go() As String
Sheets("Sheet1").Range("M5").Value = "hello"
End Function
With the result: "#VALUE!" in the formula cell M16.
I can read cells with this code, so I think the VBA "engine" is running and
working. I would like to write a value in a cell (, not read it)
Public Function go() As String
MsgBox ("-" & Range("B1").Value)
End Function
Regards,
Lars-Inge
|