Link to home
Start Free TrialLog in
Avatar of tricks801
tricks801

asked on

Making a disabled text box not have greyed out text

ideally i want a text box with a grey background, black text, and not allow the user to give it the focus. any ideas?

thanks
Avatar of Shauli
Shauli

Private Sub Form_Load()
Text1.BackColor = vbButtonFace
Text1.ForeColor = vbBlack
Text1.Enabled = False
End Sub

S
ASKER CERTIFIED SOLUTION
Avatar of JR2003
JR2003

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To make the background grey I should have put:

Private Sub Form_Load()

    With Frame1
        .Enabled = False
        .BorderStyle = 0
    End With
    With Text1
        .BackColor = vbButtonFace
    End With

End Sub

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
use label as what Dabas suggested, end of story ;-)