+ Reply to Thread
Results 1 to 2 of 2

Macro to Open a file, transfer data, save and close

  1. #1
    Registered User
    Join Date
    09-15-2009
    Location
    Saskatoon Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Macro to Open a file, transfer data, save and close

    Okay - I realize that excel is not the best place to do database type work - but it's what we have and work is not about to change it.

    I am not a VBA expert by any means and google is my friend when it comes to helping determine the code needed to create a macro.

    What I have now is multi macro, formulated file containing multiple spreadsheets that is used for creating sale documents. The workbook is formulated all using defined names so it doesn't matter if things move lines etc.

    So what I want is to set up in this file a command button so that when it goes to the sales coordinator they click the button and it will open and specific file - find the last row and populate the columns - if it was a simple copy and paste it would be easy enough to do but the data comes from various places within the workbook. I then want the work book to save and close but that I can handle without a problem.

    Hope I have given enough information

    If you have some basic code to help with this it would be greatly appreciated.

    Thanks

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Open a file, transfer data, save and close

    Hello tforbes75,

    Welcome to the Forum!
    1. Is the file to be opened always the same file or does the user need to select it?
    2. The last column on which worksheet is to be populated and with what from where?
    3. Do you have any before and after examples of the data?
    4. Do you have an example workbook that you can post?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

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