If you do this:
Does it give you any idea?Code:Msgbox "VBA says the allergy button's back color is: " & Me.btnAllergy.BackColor & vbcrlf & "And the exit button's back color is: " & Me.btnExit.BackColor
Thanks Edgar.
Actually I want to set the Allergy button's backcolor as same as the Exit button (which is light blue).
But when run the code
The Allergy button's backcolor becomes dark blue as in the second photo.Code:Me.btnAllergy.BackColor = Me.btnExit.BackColor
Odd. Only seems to work if "Use Themes" property is set to yes.Code:Me.btnAllergy.BackColor = Me.btnExit.BackColor
If this helped, please click the star * at the bottom left and add to my reputation- Thanks
thanks moke123.
the btnAllergy already Use Themes
if you look at the color picker you can get the RGB values. Then use the RGB() to set your color.
Code:me.MyControlName.BackColor = RGB(178,240,196)
If this helped, please click the star * at the bottom left and add to my reputation- Thanks