Results 1 to 1 of 1

Thread: what's wrong with that - Resolved

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    195

    Resolved what's wrong with that - Resolved

    hi everyone...

    Excel macro... trying to insert formula into the cell using this code:

    Range("G4").Formula = "=TEXT(D4;""0#"") & "" - "" & Output!B4"

    The formula inserted should be this:
    =TEXT(D4;"0#") & " - " & Output!B4
    which is exactly what you get when you do Debug.Print with the above line.
    It works on the sheet when I manually input the formula.

    But when I run it in the code, I get an error. Any ideas?

    Thanx,

    Brandon.

    SOLUTION:
    Hmm... strange, but obiously this works:

    Range("G4").FormulaLocal = "=TEXT(D4;""0#"") & "" - "" & Output!B4"
    Last edited by BrandonSk; Sep 21st, 2004 at 11:13 AM.
    Brandon

Posting Permissions

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



Click Here to Expand Forum to Full Width