+ Reply to Thread
Results 1 to 8 of 8

Continue code on next line: Compile Error: expected list separator or )

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    13

    Question Continue code on next line: Compile Error: expected list separator or )

    I am currently using a macro to search my spreadsheet for terms and if it finds them to delete the entire row.

    This has worked fine up until i hit the 1024 character line limit.

    I have tried using &_ as well as _ to bring continue the code on the next line and get "Compile Error: expected list separator or )"

    Showing only 3 terms but it continues past 1024 characters....

    Please Login or Register  to view this content.
    As Always Thanks In Advance!

    Also here if full code.
    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Continue code on next line: Compile Error: expected list separator or )

    Hello ike609 ,

    Since you have so many terms, why not list them on a worksheet in a single column?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Continue code on next line: Compile Error: expected list separator or )

    Hello there,

    Is this code only being used by you? The reason I ask is because it might be easier to provide the user with an input box which asks the user to type the value they want to search for and delete. You could use a yes no messagebox with this that would ask if the user wants to search another value where if yes is selected to provided the inputbox again if no is selected exit the code.

    Thanks!

  4. #4
    Registered User
    Join Date
    08-14-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Continue code on next line: Compile Error: expected list separator or )

    so create a sheet that i can inject into my report that has each of my terms listed in column A. next have code that searched that sheet and compares it to column A on my current sheet and delete rows that match. After that is run i can then remove the sheet from the report.

    I can figure it all out except the code to Search column A on Sheet2 and if it finds a match in Column A on Sheet1 then delete entire row.

  5. #5
    Registered User
    Join Date
    08-14-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Continue code on next line: Compile Error: expected list separator or )

    i dont think a messagebox will work because there are a lot of search terms like 30 now

  6. #6
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Continue code on next line: Compile Error: expected list separator or )

    Hello there,

    Try the following. First select the worksheet in which the values you are searching for are in column A

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-14-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Continue code on next line: Compile Error: expected list separator or )

    Worked perfect! I have added to both your reps!

  8. #8
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Continue code on next line: Compile Error: expected list separator or )

    Thank you for the star tap!

+ 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