B
Bob
Hi everyone:
Does anyone know why in VBA for excel, why I cannot write a value to a cell
in a function, but I can in a sub without arguments? Is this a bug? For
example;
Public Function w(x As Double) As Double
Range("A1").Value = x
End Function
does not work. Whereas;
Public Sub w()
Range("A1").Value = 3.23
End Sub
Does work.
So, inside a function, how can I write to a cell? I appreciate your help.
Bob
Does anyone know why in VBA for excel, why I cannot write a value to a cell
in a function, but I can in a sub without arguments? Is this a bug? For
example;
Public Function w(x As Double) As Double
Range("A1").Value = x
End Function
does not work. Whereas;
Public Sub w()
Range("A1").Value = 3.23
End Sub
Does work.
So, inside a function, how can I write to a cell? I appreciate your help.
Bob