Posts by FeedTheChunk

    Immediate Window results (from line 26 - 29 above):

    Bold Property is : False

    Bold Flag is : False

    Bold Property is now: True

    Unfortunately not. As soon as it sets the bold property it changes it to true. To be clear this also happens with the italic, underline and strikethrough properties. I'll copy the class module and a little test routine that I have for testing into a clean workbook and post it in a bit. thanks for the help.

    The case statements didn't copy paste correctly and now it won't allow me to edit it.

    This is an example of what should happen:

    Valid tag sets:
    This is <B>Bold</B> This is Bold String ends with a tag
    <B>This</B> is Bold This is Bold String begins with a tag
    This <B>is</B> Bold This is Bold Tag contained inside String
    <B>This is Bold</B> This is Bold Tag for the entire String
    <B>This is Bold This is Bold No ReSet tag
    This is <B></B>Bold This is Bold Set/ReSet tag together
    This is B<B>old</B> This is Bold Set/ReSet tags inside word

    I've created a message box class module that gives me more control over how messages are displayed. I was upgraded to MS365 and now my custom message box class doesn't work as expected.

    I'm dynamically creating textboxes and adding them to a userform. I then parse the caption to display and break out each word. Each textbox will display one word in the caption / message. Doing this allows me to set the the font properties for BOLD, Italic, Strikethrough and Underline.

    However, now when ever I attempt to change the Font.{property} it always sets it to TRUE. Can anyone explain what is going on here? Has VBA just been covering my bad programing habits and now it's coming back to haunt me?

    Can you overload functions in VBA? I thought you could but I'm getting the ambiguous name error. I have two functions:

    Function FindTableSheet(strTableName as String) as String

    ' code here

    End Function

    Function FindTableSheet (strTableName as String, ByRef strShName as String) as boolean

    ' code here

    End function

    I'm typing this in on a tablet so I may have missed typed something there. Both functions search active workbook sheets for the given strTableName. The first function returns the sheet name if it finds a table by the name in strTableName. The second one does the same but returns true if if find the table and false if it doesn't. Set strShName to the on success or vbNullChar on failure.

    Maybe I have my languages mixed up but I thought this was legal. Thanks. Chunk.