alfredo sanchez
New Member
- Joined
- Apr 3, 2003
- Messages
- 42
Hi!
Hope some of you guys can help me with this one:
I'm modifying references in formulas via vba, but when the macro writes back the cells' value, I get #NAME? error. So I'm trying to write back the formula as FormulaLocal in order to my XL version be able to work with it.
This are the lines of code I'm using
c_formls has the number of cells in ActiveSheet that have formula in them
Can you help me to put the FormulaLocal entry in the right place?
Thank you in advance.
Hope some of you guys can help me with this one:
I'm modifying references in formulas via vba, but when the macro writes back the cells' value, I get #NAME? error. So I'm trying to write back the formula as FormulaLocal in order to my XL version be able to work with it.
This are the lines of code I'm using
Code:
For i = 1 To c_formls
If Selection.Cells(i).HasFormula Then
Selection.Cells(i).Formula = Application.ConvertFormula _
(Formula:=Selection.Cells(i).Formula, FromReferenceStyle:=xlA1, _
ToReferenceStyle:=xlA1, ToAbsolute:=xlAbsolute)
End If
Next i
c_formls has the number of cells in ActiveSheet that have formula in them
Can you help me to put the FormulaLocal entry in the right place?
Thank you in advance.