Need Help with Variable to show in body

  • Below is the code where I'm having issues.
    the variable is Date. Variable is declared, I can use it in a simple example but not in the example below.

    How can I get it to read write the variable. When i run it, it says compiler error, syntax error.



    strBody = "<font face=Tahoma size=3> Hi Everyone, "<br> Today is " & Date. random text.</br></calibri> <p>" & _

    "<font color=red> Here is more text </font>" & _

    "<ul><li>Names in <font color=blue>blue</font color=blue> are cool. <li>Names in <font color=orange>orange</font color=orange> are coolest. <li>Names in <font color=green> green</font color=green> are the best.</ul> <br>More text"

  • Repost the code, this time using code tags. As it is now it is illegible.


    Welcome to the Forum. Please read the Forum Rules to understand how the Forum works and why I have added Code Tags to your post


    All VBA code posted in the forum must be wrapped in code tags, which you omitted, including single-line code snippets.Be sure to use them in future posts.


    How to use code tags


    Just highlight all of the code and press the <> in the post menu above button to add the code tags.


    Thanks.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!