locked
regarding change the font size and font color of the msg box RRS feed

  • Question

  • dear all,

    good greeting

     i have my private code in userform vba : 

     If IsDate(Me.DTPicker3) Then
            
            If CDate(Me.DTPicker3) <= Date + 30 Or Empty Then
                MsgBox "alert" & TextBox5
                Me.TextBox5.BackColor = vbRed
                
                End If

    i want the content of textbox5 which will be appear in msg box (in bold line and red color)

    how can i made it ?

    regards...........


    Monday, April 23, 2018 12:44 PM

Answers

  • Hi,

    I'm afraid MsgBox (Excel VBA) has such features. 
    If you want change size, color, or family of font, you need to use UserForm.  

    Regards,

    Ashidacchi -- http://hokusosha.com/

    • Marked as answer by TAREK SHARAF Tuesday, April 24, 2018 6:06 AM
    Monday, April 23, 2018 10:38 PM
  • Hello TAREK SHARAF,

    To show the content of textbox in msgbox, you could use

    MsgBox "alert " & Me.TextBox5.Text

    However, as far as I know, msgbox does not support showing the content in bold and red color. I would also suggest you custom a userform to replace msgbox for showing the content.

    By the way, what's the state of the below thread? If it is resolved, please mark helpful reply to close the thread. If not, please follow up to let us know your current state.

    regarding creat code to make bold border for unempty rows in excel sheet 

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by TAREK SHARAF Tuesday, April 24, 2018 6:06 AM
    Tuesday, April 24, 2018 2:10 AM

All replies

  • Hi,

    I'm afraid MsgBox (Excel VBA) has such features. 
    If you want change size, color, or family of font, you need to use UserForm.  

    Regards,

    Ashidacchi -- http://hokusosha.com/

    • Marked as answer by TAREK SHARAF Tuesday, April 24, 2018 6:06 AM
    Monday, April 23, 2018 10:38 PM
  • Hello TAREK SHARAF,

    To show the content of textbox in msgbox, you could use

    MsgBox "alert " & Me.TextBox5.Text

    However, as far as I know, msgbox does not support showing the content in bold and red color. I would also suggest you custom a userform to replace msgbox for showing the content.

    By the way, what's the state of the below thread? If it is resolved, please mark helpful reply to close the thread. If not, please follow up to let us know your current state.

    regarding creat code to make bold border for unempty rows in excel sheet 

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by TAREK SHARAF Tuesday, April 24, 2018 6:06 AM
    Tuesday, April 24, 2018 2:10 AM