Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA to Enter Formula not Value (2000)

    Is it possible to have VBA enter a formula rather than a value?

    The code
    ActiveCell.FormulaR1C1 = Range("jasper!c40").Value
    enters the result of the formula as a value and
    ActiveCell.FormulaR1C1 = Range("jasper!c40").Formula
    enters the formula found in the target cell.

    What I want is =jasper!c40 as my formula.

    How do I do this?
    Thanks in advance!

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA to Enter Formula not Value (2000)

    =jasper!c40 is not a R1C1 formula, so the correct statement would be:

    <pre> ActiveCell.Formula = "=jasper!c40"
    </pre>

    Legare Coleman

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA to Enter Formula not Value (2000)

    Thanks Legare!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •