J
Joris Adriaenssens
I have written a small macro (to convert an old spreadsheet to Euro)
Sub naar_euro()
Dim myCell As Range
Dim temp As Variant
Set myCell = ActiveCell
temp = myCell.FormulaR1C1
myCell.FormulaR1C1 = "=(" & temp & ")/40.3399"
End Sub
The content of the activecell is a number (1234). When I reach the
line 'temp = ...' I get an error :
Run-time error '-2147319784 (800028018)': Method 'FormulaR1C1' of
object 'Range' failed.
I also tried the method 'Formula', but I got the same result.
What am I doing wrong ?
Sub naar_euro()
Dim myCell As Range
Dim temp As Variant
Set myCell = ActiveCell
temp = myCell.FormulaR1C1
myCell.FormulaR1C1 = "=(" & temp & ")/40.3399"
End Sub
The content of the activecell is a number (1234). When I reach the
line 'temp = ...' I get an error :
Run-time error '-2147319784 (800028018)': Method 'FormulaR1C1' of
object 'Range' failed.
I also tried the method 'Formula', but I got the same result.
What am I doing wrong ?