+ Reply to Thread
Results 1 to 13 of 13

Copy text from textbox in disabled frame

  1. #1
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17

    Copy text from textbox in disabled frame

    Hello.

    I want to 'copy' the textbox.value, which is in disabled frame.

    Any ideas?

    Thanks!!

  2. #2
    Registered User
    Join Date
    03-07-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    182

    Re: Copy text from textbox in disabled frame

    After you copy the textbox.value what will happen next?

  3. #3
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17

    Re: Copy text from textbox in disabled frame

    N323100, I can't 'tuch' the textbox (I can't select the text, neither activate the textbox). It's in a disabled frame (wich I wan't to be enabled)

  4. #4
    Registered User
    Join Date
    03-07-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    182

    Re: Copy text from textbox in disabled frame

    Maybe you set the textbox properties to Enable = False?

  5. #5
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17
    The frame containing the textbox and other objects is disabled and I want it to stay disabled. I want the user to be able to copy the textbox's value only. How can I achieve that?

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Copy text from textbox in disabled frame

    Copy the text box and what? Do you want the contents to go to a particular cell or just to the clipboard?

    Also, where is this text box? In a user form or on a worksheet?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  7. #7
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17

    Re: Copy text from textbox in disabled frame

    Just to the clipboard.
    I use userform (in VBA).

  8. #8
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17

    Re: Copy text from textbox in disabled frame

    e.g.
    Capture.JPG

    I want copy the value '12345abcde' from the textbox1, or copy the value 'qwe' form the textbox2.
    But the Frame1 is disabled and I want it to stay disabled.

  9. #9
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Copy text from textbox in disabled frame

    The Frame being disabled doesn't effect the code. This sub will put the text of TextBox1 into the clipboard.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17

    Re: Copy text from textbox in disabled frame

    Thans mikerickson I know that. Βut the point is the user can, somehow, to choose which textbox to copy.

    Perhaps with the coordinates of the mouse? But, I think, these do not exist above a disabled frame...

  11. #11
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Copy text from textbox in disabled frame

    A listbox (or a series of checkboxes) at the side of the Frame is one notion.
    Alternatly, you could Enable the Frame, but disable each of its controls. The the Frame's MouseMove event could be polled to see where the user is pointing.

  12. #12
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17

    Re: Copy text from textbox in disabled frame

    I wanted to avoid it, because there are many elements within the frame, but eventually I will do it.

    Thank you all very much.

  13. #13
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Copy text from textbox in disabled frame

    I think that I've found something interesting. If a Frame contains a Label, the Label's MouseDown event fires if the Label is enabled, even if the frame is no enabled.

    So if you put a Label in the frame of interest and have its Enabled property opposite of the Frame's, then when the Frame is dis-abled, the Lable's mouseDown event can be polled to see if the user clicked above a text box.

    In the attached, there is this code. Note that the CheckBox1_Click event is there to control the enabling of Frame1 AND that it uses the created Frame1Enabled property rather than the Frame1.Enabled property.

    Invoke the user form, click on the check box to disable the frame and then click on some text boxes. Look at the user form caption to see what is happening. (Note that first time that one clicks on the frame after it is dialed nothing is registered.)

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. copy text from userform textbox to sheet textbox
    By Dfrost in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-28-2015, 02:19 AM
  2. [SOLVED] Userform VBA, textbox in a frame - runtime error 438
    By poolierob in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2015, 12:09 PM
  3. VBA - Macro Code to copy textbox text to another worksheet textbox
    By nitram lowm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-05-2013, 08:39 AM
  4. Enable textbox in frame
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2010, 08:00 AM
  5. Insert a Textbox in a Frame during runtime
    By foxbeat in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-15-2007, 06:34 PM
  6. Verify the format of the content of a textbox included in a frame
    By Edgar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2005, 08:05 PM
  7. change colour of disabled textbox text
    By Basil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2005, 02:05 PM

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