Hello.
I want to 'copy' the textbox.value, which is in disabled frame.
Any ideas?
Thanks!!
Hello.
I want to 'copy' the textbox.value, which is in disabled frame.
Any ideas?
Thanks!!
After you copy the textbox.value what will happen next?
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)
Maybe you set the textbox properties to Enable = False?
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?
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.
Just to the clipboard.
I use userform (in VBA).
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.
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.
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...
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.
I wanted to avoid it, because there are many elements within the frame, but eventually I will do it.
Thank you all very much.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks