Avatar of vbsterxx
vbsterxx

asked on 

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

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

copy me!label1  to  me!label2  or some such method, thanx much.
Visual Basic Classic

Avatar of undefined
Last Comment
unknown_routine
Avatar of sirbounty
sirbounty
Flag of United States of America image

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
Avatar of David Lee
David Lee
Flag of United States of America image

me!label2 = me!label1
Avatar of vbsterxx
vbsterxx

ASKER

how to copy the control, not just it's caption or value. thanx
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of sirbounty
sirbounty
Flag of United States of America image

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 .


SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
I have supplied a working solution to the question.

Accept with grade A or B seems proper.
Regards.
Avatar of sirbounty
sirbounty
Flag of United States of America image

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

Regards.
Visual Basic Classic
Visual Basic Classic

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

165K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo