+ Reply to Thread
Results 1 to 6 of 6

Changing font from a disable textbox

  1. #1
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Changing font from a disable textbox

    Hi!

    I have a userform that sometimes I need to disable a textbox (but want to leave visible the text) and the thing is that everytime I disable the textbox the font of what is written inside becomes grey. Is there a way of changing this? With a code in the macro or whatever... I would like to leave it black.

    Thanks a lot!

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Changing font from a disable textbox

    Hi Pezal,

    Instead of code such as
    Please Login or Register  to view this content.
    Use
    Please Login or Register  to view this content.
    Let me know if this helps

  3. #3
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Changing font from a disable textbox

    Hello Bas!

    Yes that was my other chance I was going to use cause at the end locking the textbox solves the main problem. I was only trying to do it the other way so that its not possible to select the inside text. I will try to look a bit more just in case!

    Thanks!

  4. #4
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Changing font from a disable textbox

    If it's very important that no one access it, you can add some code based on need. For example, if you normally tab from TextBox to TextBox, once it's locked, you can't Tab into it. Now, if you're worried that users will click in the box, then use the TextBox_Enter event.

    To do this, try something like the following code:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Changing font from a disable textbox

    Hey! That one is good!! I like it!

    Thanks man!

  6. #6
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: Changing font from a disable textbox

    Glad to help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1