+ Reply to Thread
Results 1 to 4 of 4

Thread: Button to copy cell to sheet2

  1. #1
    Registered User
    Join Date
    12-29-2011
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    24

    Button to copy cell to sheet2

    Ive rewritten my WHOLE post to make my point better:

    Ive got info in B1. I want to press a button (placed at F1) that will run a macro and copy B1 to Sheet 2.

    The issue is that I want sheet 2 to start at B2 then to B3 then to B4 so all the dates entered into B1 voer the year will be a list in sheet 2.

    I hope this makes more sense!
    Ps. Im not trying to stinge ppls knowledge and waste time. Im learning vba at the moment but im a bit lost wiht it all. Thanks heaps for any help!

    GLenn
    Last edited by gangel; 12-30-2011 at 10:48 PM. Reason: Rewrote whole questioN!

  2. #2
    Registered User
    Join Date
    12-29-2011
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Record inputs (on another sheet) in single box even when changed...

    bump!
    I changed the question to make sense now!

  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    825

    Re: Button to copy cell to sheet2

    hi gangel,
    not sure I get it but try this piece of code. hope it helps you.
    -insert a button (form control)
    -add to it this code
    -type some text in cell b1 in sheet 1
    -the code should send yr text to sheet2 in b2 (type some text in b1, a header...)
    (the next value entered in b1 will be send to sheet2 in b3 and so on...)

    Sub Button1_Click()
    Application.ScreenUpdating = 0
    'switch off screen updating to speed up code and prevent screen flickering
       Dim NextRw As Long
           With Sheet2    'find next empty row using Column b
            NextRw = .Cells(.Rows.Count, 2).End(xlUp).Row + 1
    Dim Wks As Worksheet
            Set Wks = ActiveSheet
    
            'input the cell entries
            .Cells(NextRw, 2).Value = [b1]
            End With
            Application.ScreenUpdating = 1
    End Sub
    Last edited by john55; 12-31-2011 at 05:55 AM.
    Regards, John

  4. #4
    Registered User
    Join Date
    12-29-2011
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Button to copy cell to sheet2

    hmm ok I think i havent made sense

    Ill upload the page and see if that helps!

    Thankyou for your response Medicine Packs.xlsx

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0