View Single Post
  #2   Report Post  
Gary's Student
 
Posts: n/a
Default

Here is a VBA function to take another function as an argument and return the
string representation of it:

Function FrmulaToText(r As Range) As String
Dim s As String
s = r.Formula
FrmulaToText = s
End Function

So put =FrmulaToText(A1) into A2. The function is nice because it will
update anytime you change the formula in A1.
--
Gary's Student


"DMB" wrote:


I am trying to copycell information. I need to copy the function in cell
"A1" to the cell "A2" for visual verification of the function being used in
the previus cell.


cellID cell1 cell2
cell contents =x*y*z VBA SelectionChanged Event
code
current cell result a number a number
wanted cell result a number the equation( ie. '=x*y*z)
from the defined cell

Range("A2") = Range("A1") is returning the calculated value. The number!

Software currently using
Excel 2000
Excel VBA

I would like to use the VB.net 2003 but it is easier for me right now to
just use the VBA. How hard is it to use VisualBasic.net 2003 to program excel
2000 and be event driven procedure? .SelectionChanged to repost cell
information.