Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

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?"""
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page