+ Reply to Thread
Results 1 to 4 of 4

make a textbox (in userform) unclickable

  1. #1
    Registered User
    Join Date
    01-10-2010
    Location
    Malmo, Sweden
    MS-Off Ver
    Excel 2003
    Posts
    27

    make a textbox (in userform) unclickable

    Dear excel wizards:
    So my scenario is I have a userform that should simulate a change in a process. Two textboxes are used. The first one presents the current value and so does the second one.
    But in order to simulate change there is a scrollbar the user can play around with to change the value in the second textbox. And then press a button to see what difference this would make.

    Anyway. The first textbox is set up when the userform is initialized. The second should only be controlled by the scroll bar. I don't want the user to ever touch those boxes.
    I know I could protect them. But that would mean changing the scrollbar would unprotect-change-protect. Sure that would work.

    But if I could just cancel what happened if it was clicked so that the user never enters the boxes that would make it nicer.
    Any thoughts?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: make a textbox (in userform) unclickable

    Why not use a label if you are not wanting to make use of the textbox functionality?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    01-10-2010
    Location
    Malmo, Sweden
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: make a textbox (in userform) unclickable

    Hahaha, great one!
    I thought the textboxes looked way nicer, but after your suggestion I played around with lables and found the borderline and sunken mode which made it look like a textbox. So that was a great way to get around the problem.

    Thanks!
    Still a bit curious about my last question though.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: make a textbox (in userform) unclickable

    Try using the Locked property on the textbox

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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