textbox enabled

Jaye7

Well-known Member
Joined
Jul 7, 2010
Messages
1,066
Hi All,

I set the value of textbox1.enabled=false on my userform.

Is there a way that I can set the forecolor font to black so that the text isn't faded out.

I have tried setting the textbox1.forecolor=&H80000008& but it remains faded, as obviously the textbox is not enabled.

I don't want people to be able to enter the textbox but I want the font to remain dark, not faded out.

If you could help with my other post also it would be much appreciated.

http://www.mrexcel.com/forum/showthread.php?t=539178
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I have found a way to get around this problem.

I have a textbox which I set the tag to B, when the textbox tag equals B then the script redirects as follows.

Code:
textbox30.tag="B"
 
 
Private Sub TextBox2_Enter() ' this script for all relevent textboxes
If TextBox30.Tag = "B" Then
TextBox1.SetFocus
End If
End Sub

only when I click on my commandbutton to Modify will it give me access to the textboxes as the commandbutton changes the textboxes tag to H.

then when I click on my Save commandbutton or Cancel commandbutton it then resets textbox30.tag to "B" so that if they try and click on the textboxes it then redirects again.

I managed to work something out for myself for a change.
 
Upvote 0

Forum statistics

Threads
1,217,407
Messages
6,136,425
Members
450,011
Latest member
faviles5566

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