Reputation: 1
I have a TextBox just on the worksheet , I barely have tried everything to change Font and Back colours of it , but seems like can change only if TextBox is part of UserForm Will be very appreciate for answers
Upvotes: 0
Views: 1388
Reputation: 8104
To change the font color, let's say to red, try . . .
Worksheets("Sheet1").OLEObjects("TextBox1").Object.ForeColor = RGB(255, 0, 0)
To change the back color, let's say to blue, try . . .
Worksheets("Sheet1").OLEObjects("TextBox1").Object.BackColor = RGB(0, 112, 192)
Change the worksheet name and the RGB colors accordingly.
Upvotes: 1