+ Reply to Thread
Results 1 to 4 of 4

VBA - enter formulae with quotes

Hybrid View

  1. #1
    Registered User
    Join Date
    01-14-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    VBA - enter formulae with quotes

    Hi all,

    First post . I am pretty new to VBA, know how to edit simple things I record and find on the internet.

    I am having trouble editing VBA for a formula that has quotation marks (""). I read I have to put double quotes in, but I keep getting error messages:

    eg the formula I would type into the cell is:
    ="C:\User\fx\"&J3&"\Desktop\"

    And I would like to edit the below vba to be entered like the above please:
    oEntryWsh.Range("c8").Formula = "=C:\User\fx\" & oEntryWsh.Range("J" & Cell.Row).Value & "\Desktop\"

    Thanks very much for reading!

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: VBA - enter formulae with quotes

    You need to add the quotes in the right places:

    oEntryWsh.Range("c8").Formula = "=" & """" & "C:\User\fx\" & oEntryWsh.Range("J" & Cell.Row).Value & "\Desktop\" & """"

  3. #3
    Registered User
    Join Date
    01-14-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: VBA - enter formulae with quotes

    That is perfect. Can see where I was going wrong! Thanks for the help Chance2, much appreciated!

  4. #4
    Registered User
    Join Date
    01-14-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: VBA - enter formulae with quotes

    That is perfect. Can see where I was going wrong! Thanks for the help Chance2, much appreciated!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1