Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

VB copy a text box

Discussion in 'Information Technology' started by msmuzila@gmail.com, Jul 28, 2006.

Tags:
  1. msmuzila@gmail.com

    msmuzila@gmail.com
    Expand Collapse
    Guest

    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
     
  2. Loading...

    Similar Threads Forum Date
    Opinion Akal Takht concerned on drug addiction, copying during exams Breaking News Nov 5, 2013
    SciTech New Quantum Dot Technique Combines Best of Optical and Electron Microscopy Breaking News Jun 17, 2013
    India Copy of 48th Rreport of 'LOKPAL BILL 2011' Presented in Parliament Breaking News Dec 10, 2011
    Bhagats Sheikh Farid Copyright? History of Sikhism Nov 14, 2011
    Christianity Public library find is only surviving copy of rebel hymn book Interfaith Dialogues Jan 8, 2011

  3. JLatham

    JLatham
    Expand Collapse
    Guest

    MCX_Name.SetFocus
    DoCmd.RunCommand acCmdCopy

    that will place it on the clipboard.

    "msmuzila@gmail.com" wrote:

    > 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
    >
    >
     
  4. msmuzila@gmail.com

    msmuzila@gmail.com
    Expand Collapse
    Guest

    Thanks that works.

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

    Grinder
    Expand Collapse
    Guest

    msmuzila@gmail.com wrote:
    > 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?"""
     

Share This Page