VB copy a text box

M

msmuzila

I have a text box and a command button. I want to command button to
select the contents of the text box and copy it to the clipboard so
that i can paste it in another program. Here is the code that i have
for the command button so far. The setfocus is the command i am using
to select all.

Private Sub Command300_Click()
MCX_Name.SetFocus
End Sub

Thanks
Matt
 
M

msmuzila

Thanks that works.

Another question: how do you get the " sign in the actual text using vb
 
G

Grinder

Thanks that works.

Another question: how do you get the " sign in the actual text using vb

You double up the double quote to escape it.

Text1.Text = "They call me ""Tim?"""
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top