+ Reply to Thread
Results 1 to 8 of 8

Need Help! Mandatory cell to highlight before saving

  1. #1
    Registered User
    Join Date
    08-22-2013
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2010
    Posts
    43

    Need Help! Mandatory cell to highlight before saving

    Please Help!
    I have developed report sheet that uses macro!
    There are few mandatory cells that need to be filled before save, but i am trying to highlight the border in bold red.
    Please Login or Register  to view this content.
    Is there a way to clean this up a bit?
    Thank you!

  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,258

    Re: Need Help! Mandatory cell to highlight before saving

    Hello v,

    You can use the BorderAround method for a Range object. It allows to set the line style, weight, and color. You would of course need to remove the border at some point. To do that, simply set the LineStyle argument to LineStyle:=xlLineStyleNone
    Please Login or Register  to view this content.
    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
    Registered User
    Join Date
    08-22-2013
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Need Help! Mandatory cell to highlight before saving

    simply set the LineStyle argument to LineStyle:=xlLineStyleNone
    Can you help me with the cells that are merged, and write the full argument code?
    Thank you Leith Ross!

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

    Re: Need Help! Mandatory cell to highlight before saving

    Hello dgavranovic,

    It would help to see your workbook.

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.

  5. #5
    Registered User
    Join Date
    08-22-2013
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Need Help! Mandatory cell to highlight before saving

    It seems that the administration rights at work wont let me to attach the file.
    I will try to copy and pace the full code that i have in this work book!
    Please Login or Register  to view this content.
    Thank you!

  6. #6
    Registered User
    Join Date
    08-22-2013
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Need Help! Mandatory cell to highlight before saving

    Now i Need help with:
    1. Reset border line to automatic.
    2. Highlight merged cells that are (B39:K40)
    Please Login or Register  to view this content.
    3. And argument to remove the highlight.

    Thank you!

  7. #7
    Registered User
    Join Date
    08-22-2013
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Need Help! Mandatory cell to highlight before saving

    I have found a way to deal with highlighting the border of a mandatory cell, and for removing the highlight.
    This code is for mandatory cell to highlight the border
    Please Login or Register  to view this content.
    This code is for merged cells
    Please Login or Register  to view this content.
    And this code is to remove the border highlight
    Please Login or Register  to view this content.
    Thank you for the support!

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

    Re: Need Help! Mandatory cell to highlight before saving

    Hello dgavranovic,

    This will set the border around the merged cells to red if there is no data. Otherwis, the border is removed.
    Please Login or Register  to view this content.

+ 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. [SOLVED] Creating a mandatory Field Before Saving a file
    By dgavranovic in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-22-2013, 03:04 PM
  2. Mandatory field required message when user skips mandatory fields
    By Bharathi27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2013, 05:12 AM
  3. Need code to make completion of certain cells mandatory before saving file
    By SBeirne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-14-2012, 12:04 PM
  4. Saving Template/workbook With Mandatory Field
    By JBeaucaire in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2008, 02:43 PM
  5. Mandatory fields check before saving the file
    By sudheesh.e in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-20-2008, 12:11 AM

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