+ Reply to Thread
Results 1 to 4 of 4

'Continue For' gives error (does not work)

  1. #1
    Forum Contributor sauerj's Avatar
    Join Date
    11-11-2009
    Location
    Lafayette, IN
    MS-Off Ver
    Excel 2019
    Posts
    163

    'Continue For' gives error (does not work)

    I am working on MS Word 2010. When I use 'Continue For', it gives error ("Expected: Expression").
    Please Login or Register  to view this content.
    I am on Word 2010, VBA 7.0
    I get a red error on the 'Continue For'; what possibility could be wrong with this?
    I've never used a 'Continue For' before.
    (I've got the .Find.Found properly associated; so don't worry about that; I only show the above streamlined so to zero in on the 'Continue For' part)
    Last edited by sauerj; 12-02-2014 at 09:13 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: 'Continue For' gives error (does not work)

    There is no continue function in VBA.
    Also you have an End With without a With inside the loop.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: 'Continue For' gives error (does not work)

    As mehmetcik indicates, there is no 'Continue For' in Word VBA.

    It's not clear what you're trying to achieve, but perhaps the following macros will give you some pointers. The first one bolds the found text wherever it is found in a table. The second one bolds it only if it's in column 2 in a table.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  4. #4
    Forum Contributor sauerj's Avatar
    Join Date
    11-11-2009
    Location
    Lafayette, IN
    MS-Off Ver
    Excel 2019
    Posts
    163

    Re: 'Continue For' gives error (does not work)

    Thanks guys! Prior to my first post, I did a google search and got led astray because I saw an example using the 'Continue For' command, but upon re-looking (more carefully this time), I now see that that example was for "Visual Studio", not VBA. ... Thanks for taking the time to set me straight.

+ 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. Caputre WB name on error and continue
    By Coleman34 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 10-08-2014, 04:13 PM
  2. Continue to get Sub not defined error? Can anyone help?
    By cody4334 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2012, 05:00 PM
  3. Replies: 4
    Last Post: 04-01-2011, 12:02 PM
  4. Code error, highlight error, continue to RUN
    By JohnSeito in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-07-2008, 01:29 AM
  5. VB Formula error in macro, How to Continue?
    By Mikeco in forum Excel General
    Replies: 7
    Last Post: 04-30-2008, 07:29 PM

Tags for this Thread

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