none
Can NOT change BackColor of Label on Worksheet (can change on UserForm) RRS feed

  • Question

  • I have Office Pro. Plus 2016.
    After updating Office (I don't remember when), BackColor of a Label on Worksheet can NOT be changed, but that on UserForm can be changed. 

    I've waiting for being fixed the issue from Version 16.0.7167.2060, and I've just updated to Version 1610 (Build 7466.2038). But the latest version cannot fix it.
      

    I've shared a sample file with VBA.
    Excel_UserForm_Label_Transparent_new.xlsm
      
       When clicking the Label, BackColor shows a selected Color correctly. But after mouse pointer is out from the Label, BackColor turns to white (or transparent).
      

    I hope MS Excel-team will check it and recognize the issue and fix it.

    Best Regards,
    Ashidacchi (Hideki ASHIDA)


    • Edited by Ashidacchi Friday, November 11, 2016 11:22 PM
    Friday, November 11, 2016 11:13 PM

Answers

  • Change the code in the Option buttons from BackColor to BackStyle like the following.

    ' --- Radio button on Sheet
    Private Sub rbt_Opaque_Sheet_Click()
        lbl_Test.BackStyle = fmBackStyleOpaque
    End Sub
    Private Sub rbt_Transparent_Sheet_Click()
        lbl_Test.BackStyle = fmBackStyleTransparent
    End Sub


    Regards, OssieMac

    • Marked as answer by Ashidacchi Saturday, November 12, 2016 8:54 AM
    Saturday, November 12, 2016 5:21 AM

All replies

  • Change the code in the Option buttons from BackColor to BackStyle like the following.

    ' --- Radio button on Sheet
    Private Sub rbt_Opaque_Sheet_Click()
        lbl_Test.BackStyle = fmBackStyleOpaque
    End Sub
    Private Sub rbt_Transparent_Sheet_Click()
        lbl_Test.BackStyle = fmBackStyleTransparent
    End Sub


    Regards, OssieMac

    • Marked as answer by Ashidacchi Saturday, November 12, 2016 8:54 AM
    Saturday, November 12, 2016 5:21 AM
  • Hi OssieMac,

    Thanks a lot.
    Using "BackStyle" is effective, as you suggested.

    Regards,
    Ashidacchi
    Saturday, November 12, 2016 8:55 AM