+ Reply to Thread
Results 1 to 6 of 6

Transfer information from one sheet to another using a command button!

  1. #1
    Registered User
    Join Date
    05-12-2013
    Location
    Horsham
    MS-Off Ver
    Excel 2013
    Posts
    42

    Transfer information from one sheet to another using a command button!

    I want to transfer the data from "INPUT" to "RAWDATA" putting the information in to the relevant columns and look for the next available "Clear" cell.

    In some circumstances some cells may be filled but some blank in which case it would need to look for the next completely clear row.

    I have attached a copy so hopefully it makes more sense
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Transfer information from one sheet to another using a command button!

    Hi melliard

    try this attached file and let me know is it what ur looking for...

    Hope this will work
    Attached Files Attached Files
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Registered User
    Join Date
    05-12-2013
    Location
    Horsham
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Transfer information from one sheet to another using a command button!

    Looks and works well I would like to have the sheets hidden. I have changed the coding to cover some more cells and a few basic changes but code you code it to hide and unhide the relevant sheets:

    Sub Submit_Data()
    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
    Dim FR As Long, sh As Worksheet
    Set sh1 = Sheets("INPUT")
    Set sh = Sheets("RAWDATA")
    cels = Array("D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15", "D17", "D18", "D19", "D20", "D22", "D23", "D24", "D25", "D26", "D27", "D28", "D30", "D31", "D32", "D33", "D34", "D36", "D37", "D38", "D39")
    With sh
    FR = .Range("A" & .Rows.Count).End(xlUp).Row + 1
    j = 1
    For i = LBound(cels, 1) To UBound(cels, 1)
    sh1.Range(cels(i)).Copy
    .Cells(FR, j).PasteSpecial (xlPasteValues)
    j = j + 1
    Next
    .Select
    .Range("A9").Select
    sh1.Select
    sh1.Range("D4:D22").ClearContents
    sh1.Select
    sh1.Range("G15:J15").ClearContents
    sh1.Select
    sh1.Range("D28").ClearContents
    sh1.Select
    sh1.Range("D24").ClearContents
    End With
    MsgBox "Data Submitting Done !"
    Application.ScreenUpdating = True
    Application.DisplayAlerts = True
    End Sub

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Transfer information from one sheet to another using a command button!

    which sheet do you want to hide and when after running a macro ?

    If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
    If the suggestion helps you, then Click * to Add Reputation and give your valuable comments

  5. #5
    Registered User
    Join Date
    05-12-2013
    Location
    Horsham
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Transfer information from one sheet to another using a command button!

    I have a home screen with command buttons and command buttons on each sheet which will make sheets visible (TRUE/FALSE) but it will not submit the data as the sheet is hidden so it is only an issue between the Input & Rawdata sheet. So when you hit the Submit Data it will unhide the rawdata sheet submit then re-hide - Make sense? :-)

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Transfer information from one sheet to another using a command button!

    Now try this attached file....
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Command button to transfer between shhets
    By troysie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2013, 02:53 AM
  2. VBA Script for Transfer Data from Entry Sheet to Master by Using Command Button
    By sgolwalkar4ever in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 07:24 AM
  3. Replies: 1
    Last Post: 04-07-2011, 02:43 AM
  4. Get information from Another Worksheet via Command Button
    By novemberoyce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-17-2010, 01:20 AM
  5. Macro for command button to transfer value
    By Strugggler in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-26-2009, 06:27 PM

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.6.0 RC 1