SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: CSS in VBA

  1. #1
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS in VBA

    Hi, I have code and it's work OK:

    HTML Code:
     Email_Body = Email_Body & "<BR>" & _
                "<ol><li style=""list-style-type: disc""><B>" & Incident_Sev_3_WS.Cells(i, 6).Value & " - " & Incident_Sev_3_WS.Cells(i, 5) & "</B>" & _
                "<ul><li style=""list-style-type: circle""><B>Date: </B>" & Incident_Sev_3_WS.Cells(i, 1).Value & "</li>" & _
                "<li style=""list-style-type: circle""><B>Businesses Affected: </B>" & Incident_Sev_3_WS.Cells(i, 22).Value & "</li>" & _
                "<li style=""list-style-type: circle""><B>Regions Impacted: </B>" & Incident_Sev_3_WS.Cells(i, 15).Value & "</li>" & _
                "<li style=""list-style-type: circle""><B>Business Impact: </B>" & Incident_Sev_3_WS.Cells(i, 23).Value & "</li>" & _
                "<li style=""list-style-type: circle""><B>Incident Description: </B>" & Incident_Sev_3_WS.Cells(i, 4).Value & "</li>" & _
                "<li style=""list-style-type: circle""><B>Root Cause Category: </B>" & Incident_Sev_3_WS.Cells(i, 16).Value & "</li>" & _
                "<li style=""list-style-type: circle""><B>Contact: </B>" & Incident_Sev_3_WS.Cells(i, 8).Value & "</li>/ul></li></ol>" & _
                "<B><font: color:"" red"">" & Incident_Sev_3_WS.Cells(i, 7).Value & "</B>"
    Now I want to last line:
    HTML Code:
     "<B><font: color:"" red"">" & Incident_Sev_3_WS.Cells(i, 7).Value & "</B>"
    format with font color RED.

    please help

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    Do it like this:
    Code:
    "<b style=""color:#f00000"">" & Incident_Sev_3_WS.Cells(i, 7).Value & "</b>"
    You'll have to work out if all the double quote marks are all correct.

  3. #3
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks!

    I have already did it like:

    HTML Code:
    "<font color=""RGB(255,33,170)""><B>" & Incident_Sev_3_WS.Cells(i, 7).Value & "</B></font>"

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by forestq View Post
    thanks!

    I have already did it like:

    HTML Code:
    "<font color=""RGB(255,33,170)""><B>" & Incident_Sev_3_WS.Cells(i, 7).Value & "</B></font>"
    Yes but that's not the best way to do it because the font tag is deprecated in strict doctypes and should never be used these days in any page (along with the deprecated attributes you have used). It is a redundant tag in that context anyway anyway as you have a perfectly good element to use already so there simply is no need to add a useless and deprecated tag.


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
  •