+ Reply to Thread
Results 1 to 4 of 4

Send cell data to next available blank row on another WB via Command button

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    117

    Send cell data to next available blank row on another WB via Command button

    So im a bit of a noob with macros although im trying my best to learn.

    With the help of some of the amazing clever members on here ive managed to learn a few basics including Command buttons that autosave as cell values etc.

    Now ive been thinking of asking about this next query for a while but always thought it was not possible, but now as im learning new things i wonder if it is possible.

    So currently when i raise an invoice or quotation etc i have to manually record that files specifics in my main WB. Example - I complete an invoice and then manually record the transaction on the next blank row available on the sales page of my main WB. Is there a way to create a command button that upon completing the invoice & once clicked collects the relevant information from the relevant cells in the invoice WB and sends this data to the corresponding cells in the next available BLANK row on the sales page negating the need to manually enter this data?

    My gut feeling tells me this is above my understanding of macros but i cant shake the curiousity. Further more i suppose if this is possible, but then the user amends that particular invoice, when sending the data to the main WB it will need to UPDATE the existing record rather than creating a new one in the next available blank row. I hope this makes sense?? Someone please put me out of misery and tell me this cant be done?

    If it can be done i suppose i am looking for a template to do this, where i can enter the relevant cells and filepaths my self.

    Thanks in advance

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Send cell data to next available blank row on another WB via Command button

    Hi,

    Yes this is a fairly common and simple task with VBA.

    If you upload your workbook containing your invoice template and sales record data sheet I'll happily add the functionality for you.

    The general approach I use is to keep a working row of cells above the database of sales records and link each of those cells back to the invoice template. Then when you click the button to update the Sales database the macro simply copies the working row and pastes it back as values to the next available row on the data sheet.

    Editing an existing record just requires another macro to extract the current data from the Sales data back to the invoice template, or pehaps a mirror of it which can then be edited and then updated back to the Sales data.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    09-04-2013
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    117

    Re: Send cell data to next available blank row on another WB via Command button

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Yes this is a fairly common and simple task with VBA.

    If you upload your workbook containing your invoice template and sales record data sheet I'll happily add the functionality for you.

    The general approach I use is to keep a working row of cells above the database of sales records and link each of those cells back to the invoice template. Then when you click the button to update the Sales database the macro simply copies the working row and pastes it back as values to the next available row on the data sheet.

    Editing an existing record just requires another macro to extract the current data from the Sales data back to the invoice template, or pehaps a mirror of it which can then be edited and then updated back to the Sales data.
    Thanks for your reply, does this work if they are 2 seperate WB's?

    Also, as these are live (in use) WB's they contain sensitive data if i take the time to send blank copies can i simply copy and past the changes over or is it not as simple as that?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Send cell data to next available blank row on another WB via Command button

    Hi,

    Yes it could work across two workbooks. Both will need to be open in memory, or at least the macro will need to open the Sales sheet. However first consider whether you really do need two workbooks. It's always easier if you keep things together. Why do you need two workbooks?

    Are you trying to have several people using templates to update the same single sales data workbook. If so I see you opening up a whole range of other problems. Excel is essentially a single user system (albeit that others can open read only copies of the same workbook), and although there is the concept of workbook sharing it's not generally regarded as sufficiently flexible for real world applications and most of us steer well clear of recommending it.

+ 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 multiple data to other sheets, saving in PDF, send email
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-29-2013, 02:03 PM
  2. Send data from input to relevant worksheet using command button?
    By Si902 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2011, 03:55 PM
  3. What command will send a result to a blank cell?
    By vcrt in forum Excel General
    Replies: 2
    Last Post: 03-02-2010, 09:12 AM
  4. command button to send email
    By artromanov in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2007, 09:02 PM
  5. Use command button to send email
    By Slugger in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-28-2005, 04:06 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