+ Reply to Thread
Results 1 to 6 of 6

Help request to add a colored border to the message

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Help request to add a colored border to the message

    Hi friends,

    I want to add a colored border to the message. Please suggest me a code to achieve this target.

    Any help will be highly appreciated.

    Thanking you,
    Sincerely,

    mso3

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Help request to add a colored border to the message

    Hi, mso3,

    what kind of message are you talking about? A couple of cells in a sheet, UserForm or the standard message box (where according to my knowledge you would have to make your own UF looking like a MsgBox in order to make a border)?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add a colored border to the message

    Hi Holger,

    Greetings from me!

    I’m sending the birthday wishing mails. Now to make the message more decent I want to add a red color border to the message.

    Here I’m attaching a workbook for your perusal.

    Thanking you,
    Attached Files Attached Files

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Help request to add a colored border to the message

    Hio, mso3,

    you coukd have passed a top that itīs Outlook and HTML you are tralking about. Not so surprising thereīs a border-element in HTML as well as VBA and you should have to integrate width, style and colour for it.

    Code may look like
    PHP Code: 
    ..."p style=""border:5px solid #FD0606;""... 
    right after an opening tag and before center for the whole message as well as the closing tag at the end of the message. Code may not presented here in total due to security blocking (and I donīt have a version of outlook on hand at home to test)

    I strongly recommend to use objects instead of repeating the sheetname over and over again, and a loop would reduce the number of lines in the code.

    Ciao,
    Holger

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Help request to add a colored border to the message

    Hi, mso3,

    as any HTML-code is blocked I may only offer the workbook without testing.

    I donīknow why everybody uses a version of the code which is way beyond being effective as you could use the Autofilter with the newly entered formula on sheet "Data" and loop only on visible cells (if any).

    Ciao,
    Holger

  6. #6
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Help request to add a colored border to the message

    Hi Holger,

    Greetings from me!

    I think it's not possible. So I'm marking the thread solved now. However, I learned a new approach from you to shorten the code.

    I'm thankful to you for your continuous kind cooperation to solve problems.

    Have a nice time.

+ 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] Help request to get numbers of cards created in the message
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-17-2015, 12:06 AM
  2. pop up message request
    By slytidar in forum Excel General
    Replies: 7
    Last Post: 05-31-2014, 03:32 AM
  3. [SOLVED] Code to reminder pop message on due date request
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-03-2014, 08:31 PM
  4. Replies: 1
    Last Post: 11-09-2013, 02:43 AM
  5. Message Boxes If the cells are Colored
    By DrNo1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2012, 03:50 PM
  6. Colored border doesn't appear for formula area.
    By Mons in forum Excel General
    Replies: 1
    Last Post: 06-26-2007, 01:44 PM
  7. [SOLVED] MESSAGE BOX ON REQUEST
    By Carolan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2006, 06:55 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