Thread: execute formula
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KentAE[_2_] KentAE[_2_] is offline
external usenet poster
 
Posts: 6
Default execute formula

Hi,

Wy doesn't this sub works? I get "VÄRDEFEL!" (faild value) in Swedish
The formula works in excel after F2 and Enter

Sub Sum()

myCol = "F"
myFirstCell = myCol & "7"
myLastCell = myCol & "24"
myArea = myFirstCell & ":" & myLastCell
mySumCell = myCol & "27"
Range(mySumCell).Activate
txt = "=SUM(" & myArea & ")"
ActiveCell.Formula = txt
ActiveCell.Calculate

End Sub
--
If you are old enough, you have your future behind you.