Excel Copy text code help needed :-) RRS feed

  • Question

  • Hi

    I currently have a worksheet called "Plan" where the user will enter text into "C34", once complete they will click on a form control button to email the spreadsheet.

    I need help with code that would "copy" the text from "C34" to a worksheet named "Goal 1", position "C8" when the user clicks the form control button.

    Any help would be greatly appreciated.
    Thursday, July 6, 2017 10:34 PM

All replies

  • How about this code?
    Private Sub btn_Copy_Click()
      Application.ScreenUpdating = False
      ' ----------
      ActiveSheet.Range("C34").Copy _
        Destination:=Worksheets("Goal 1").Range("C8")
      ' ----------
      Worksheets("Goal 1").Select
    End Sub
    [btn_Copy] is on worksheet "Plan", instead on a user form. But it would work both on worksheet and user form.


    Friday, July 7, 2017 1:45 AM
  • Hi Steven,

    Have you tried Ashidacchi's suggestion?

    If it helped, please remember to come back and mark it as an answer to close the thread. If you have any further question about Excel Macro codes, I suggest you can ask a question in Excel for developers forum for more discussion:


    Best Regards,

    Winnie Liang

    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, July 11, 2017 2:04 AM