sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I'm trying to find a way to change the background colour of textboxes on a userform to assist users who have dyslexia.
I thought it might be as simple as setting their preferred colour on installation of the file, then calling that colour each time the form is loaded, but it doesn't work.
This is what I have so far:
I'm then trying to set the colour like this:
Now what should happen, if my theory was correct, is that the textbox should have a yellow background but it doesn't, it's black!
Can anyone help me please?
I thought it might be as simple as setting their preferred colour on installation of the file, then calling that colour each time the form is loaded, but it doesn't work.
This is what I have so far:
Code:
Public Yellow As LongPublic Gray As Long
Public White As Long
Sub SetColours()
If Sheet2.Range("B11").Value = "Yellow" Then
BColor = &H80FFFF
End If
If Sheet2.Range("B11").Value = "White" Then
BColor = &H80000005
End If
'Yellow = &H80FFFF
'Gray = &H8000000F
'White = &H80000005
End Sub
I'm then trying to set the colour like this:
Code:
Private Sub UserForm_Initialize()
SetColours
TextAgg.BackColor = BColor
Now what should happen, if my theory was correct, is that the textbox should have a yellow background but it doesn't, it's black!
Can anyone help me please?