+ Reply to Thread
Results 1 to 2 of 2

Please help with Expected: end of statement error

  1. #1
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    2021
    Posts
    205

    Please help with Expected: end of statement error

    I'm trying to put the following code into a macro. It works when used as a regular formula in excel, but when I try to put it in VBA, I get an error. What am I doing wrong?

    Please Login or Register  to view this content.
    If it helps, I attached the actual file this macro will be used in. The existing macro works just fine. I just needed to add a snippet of code to the existing macro:
    Please Login or Register  to view this content.
    , but when I do that to the existing macro to make the above code, I get the error...
    Attached Files Attached Files
    Last edited by Ocean Zhang; 03-19-2015 at 07:49 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Please help with Expected: end of statement error

    Hi Ocean

    Wrap the "d" with double quote marks

    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  2. [SOLVED] Compile error: Expected end of statement
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 07:12 PM
  3. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  4. Compile Error Expected: End of statement
    By AKarmyguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2010, 02:20 AM
  5. How to fix a Compile Error Expected: End of statement.
    By AKarmyguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2010, 02:19 AM

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