Results 1 to 20 of 71

Thread: Macro to highlight if certain Word table cells are blank

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    VBAX Regular
    Joined
    Dec 2006
    Posts
    71
    Location
    What I am trying to do overall is detect if a content control has had text entered (for text content controls) or had an option selected (for a drop down). If no text has been entered or no drop down selected then I want to highlight the content control.

    The code works.

    My only exception pertains to the voteauth and voteauthin controls. If voteauth is "Jerry Lewis" then I don't care if voteauthin is blank. It should not be highlighted.

    That is working. What I need to happen is if voteauth is changed off of "Jerry Lewis" (to any other drop down list entry) and voteauthin is blank, then highlight voteauthin as something now needs to be entered there.

    I also still don't understand if we have a case that only looks for character length (the longname and shortname cases) then how does typing something in and then exiting that control have the background changed to white since it appears to me that all we asked the code to do for that case is look for character length. Ultimately this is the behavior I want so I'm not too unhappy but I would like to understand how we are getting other code to run for that case.

    Frosty, using your example above the longname and shortname cases fall into your:
    [VBA]Case 2
    'do some special stuff, and do the standard
    bDoStandard = True
    [/VBA]


    However, the only code we provide is for the special stuff. We never tell it to do the standard stuff yet it does anyway.
    Last edited by g8r777; 08-03-2011 at 01:19 PM.

Posting Permissions

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