+ Reply to Thread
Results 1 to 4 of 4

Is VBA skipping lines of code?

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    39

    Is VBA skipping lines of code?

    I have had two instances with a spreadhsheet that I'm working on where code wasn't functioning as it should be. I can't recall the first item, but the second one is currently occurring and I have no idea why. Basically, I'm trying to draw focus to specific frames as people enter/select data, with the next frame in the series being highlighted in red. Here's the code:

    Please Login or Register  to view this content.
    The code was only changing the foreground color to red but not the border. I went back and inserted message boxes to step into the formatting (now commented out) and it worked perfectly. Does anyone have any idea why this might be occurring?

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Is VBA skipping lines of code?

    Try stepping through the code line by line to see if it is skipping. To step through -
    Click anywhere within the code
    Press F8 to execute each line and move to the next line
    I suspect that either the border and fore colors are the same that they "blend" together. Or There is no border to color.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    10-08-2012
    Location
    NC
    MS-Off Ver
    Excel 2013
    Posts
    39

    Re: Is VBA skipping lines of code?

    Thanks. I finally got tired of tinkering with it and set the borderstyle to 1 permanently. I had been having it go from a border to the etched effect and back to border when I wanted to add color. Anyway, with the border "always on" the color works without fail.

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Is VBA skipping lines of code?

    Glad you were able to get it figured out.

+ 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. Need help cascading a formula while skipping lines
    By johndoby in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-12-2013, 12:48 AM
  2. [SOLVED] Sub is skipping lines of code after Then statement
    By chavez982 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-05-2012, 10:32 PM
  3. [SOLVED] How do I allow for skipping lines between dates??
    By n2music in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-10-2012, 10:28 AM
  4. return results without skipping lines.
    By mjhopler in forum Excel General
    Replies: 2
    Last Post: 07-13-2010, 04:01 AM
  5. Copy a formula skipping lines
    By JapanDave in forum Excel General
    Replies: 3
    Last Post: 06-01-2010, 05:11 AM
  6. [SOLVED] Need help in numbering a column while skipping lines
    By Gary Reger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2005, 06:10 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