TexBox Woes

Rang655

New Member
Joined
Jul 2, 2009
Messages
14
:mad: I have a text box linked to a cell on a different tab. Eventually that tab will be hidden and password protected. The tab that has the text box is lock in properties, and locked in format controls. and the tab (worksheet) is protected with nothing selectable; however, when I click on the text in the text box I can change the text unless I'm in design mode. I can find any macros that would allow me to control the design mode. I can find anything that would allow me to change the font color if the text box is disabled. So how can I protect the text and/or make the fore color Black??? Anyone have any ideas?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Not sure exactly what you are looking for. This is one way, if the text box is on a userform. The code would go into the UserForm code module.

Code:
Private Sub UserForm_Initialize()
    With Me.TextBox1
        .Enabled = False
        .BackColor = &H800000
    End With
End Sub

If the text box is on the sheet, then the code could be put into the sheet module and renamed to eliminate the userform reference.
 
Last edited:
Upvote 0
I tried this code and it didn't work. I gave up and did it a different way without the text box. Thank you for you efforts anyway.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top