PDA

View Full Version : vba problem



15-10-2001, 08:23 AM
Each of the two following lines of code work separately but not the third. Can someone help please?

ActiveCell.Formula = '=SUM(RC[1]:RC[10])'

ActiveCell.Formula = '=t7'

ActiveCell.Formula = '=t7' - '=SUM(RC[1]:RC[10])'

15-10-2001, 09:45 AM
Try this instead:
ActiveCell.Formula = '=t7 - SUM(RC[1]:RC[10])'

This will paste the formula, '=t7 - SUM(RC[1]:RC[10])' into the cell.

15-10-2001, 10:14 PM
Thanks Scooby Do but I want thr value in the cell not the formula the first two code lines give the value aafter that I can only get the formula or NAME!?