Excel VBA code line continuation - Compile Error: Expected Expression
Excel VBA code line continuation - Compile Error: Expected Expression
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Excel VBA code line continuation - Compile Error: Expected Expression

  1. #1
    New Member
    Join Date
    Feb 2018
    Posts
    0
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Excel VBA code line continuation - Compile Error: Expected Expression

     
    Hi one and all,
    been referencing this site for solutions to all my excel conundrums for a fair while now
    And finally I have a problem where I can not find a solution.
    Here goes -

    I am using VBA to try and insert a concatenation formula into a cell and then loop through until it reaches the last row containing data.
    The concatenation formula is quite long with all the variables etc, so I am trying to use the line continuation, space followed by the underscore then followed by newline(enter)

    Problem is I can not get it to work, as soon as I put in the line continuation I get a compile error of either Expected Expression or Expect End of Statement or such.
    I have tested with

    Code below

  2. #2
    MrExcel MVP
    Moderator
    Peter_SSs's Avatar
    Join Date
    May 2005
    Location
    Macksville, Australia
    Posts
    35,638
    Post Thanks / Like
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Excel VBA code line continuation - Compile Error: Expected Expression

      
    Welcome to posting at MrExcel.

    If you want this question answered, you need to post it in the Excel Questions forum as this one is just for testing.
    Hope this helps, good luck.
    Peter
    Excel 365 + Excel 2010, 2007 - Windows 10, 7
    - Want to help your helpers by posting a small, copyable, screen shot directly in your post? Look here
    - If posting vba code, please use Code Tags - like this [code]Paste code here[/code] - or use the VBHTML Maker
    - Read: Forum Rules & Forum Use Guidelines

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com