+ Reply to Thread
Results 1 to 6 of 6

Adding in a ' mark with VBA

  1. #1
    Registered User
    Join Date
    04-10-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    32

    Adding in a ' mark with VBA

    So I'm blowing up these forums apparently today. sorry!

    So my issue this time around, I am running a macro that when Option A is selected, Option_A is run. That problem was solved, but another arose....

    Option_A is suppose to simply:

    ActiveCell.Offset(0, 1).Formula = "=INDIRECT(" '"&R[0]C[-5]&"'!E62"))"

    basically it's just taking a sheetname that someone puts in a cell 5 left and use that in order to pull off of that sheet name they put in.

    Issue is, I can't get past the fact that it thinks I want to put in a note after the ' mark. But I need that mark in there for the correct formula in the cell.

    Is this possible?

    Thanks!!

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding in a ' mark with VBA

    you've gotta double the quotes in the formula string
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    04-10-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Adding in a ' mark with VBA

    Thanks for that one! The good news is, it's not reading it as a note anymore, but now when I try to run the macro it bugs out with an error "Application-defined or object-defined error" and highlights that row.


    any thoughts?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding in a ' mark with VBA

    my bad
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-10-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Adding in a ' mark with VBA

    Awesome, you rule.

    Sad part is, I even knew that should have been formulaR1C1 but it didn't hit me.

    Thanks!

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding in a ' mark with VBA

    you're welcome :-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Automate Series Number With Adding Mark (.) or mark "-"
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-06-2014, 12:38 PM
  2. Replies: 2
    Last Post: 10-28-2013, 03:52 PM
  3. Mark row by adding text to last column (using VBA)
    By AnnK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2010, 11:36 AM
  4. Replies: 2
    Last Post: 02-04-2009, 01:06 PM
  5. Adding a Check Mark commant to the Menu
    By TimlmiT in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2005, 07:05 PM

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