We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

how: copy / past,   labels / textboxes, using code in vb???

vbsterxx
vbsterxx asked
on
Medium Priority
298 Views
Last Modified: 2010-05-02
how: copy / past,   labels / textboxes, using code in vb???

copy me!label1  to  me!label2  or some such method, thanx much.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2007

Commented:
If
Text1.text="Text"
Label1.Caption="Text"
Then...


Private Sub Command1_CLick()
Text2.text=Text1.text
End Sub


Private Sub Command2_Click()
Label2.caption=label1.caption
End Sub
CERTIFIED EXPERT
Top Expert 2010

Commented:
me!label2 = me!label1

Author

Commented:
how to copy the control, not just it's caption or value. thanx
CERTIFIED EXPERT
Top Expert 2007
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Top Expert 2007

Commented:
You can also create more at runtime...see here: http://www.vbexplorer.com/VBExplorer/vb_feature/april2000/april2000.asp

You can not copy/paste a control at run time.

This is because unilike VB IDE clipboard object won't hold the control information .


Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
I have supplied a working solution to the question.

Accept with grade A or B seems proper.
Regards.
CERTIFIED EXPERT
Top Expert 2007

Commented:
I suggest a split:  sirbounty {http:#10745889} & unknown_routine {http:#10746287}
Split seems good to me.

Regards.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.