+ Reply to Thread
Results 1 to 12 of 12

Copying a date from one workbook to another

  1. #1
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116

    Copying a date from one workbook to another

    Hi

    I Have a workbook with 3 worksheets in it, the Sheet named "Costomer info" has the date in cell C15 I then press a button that opens the sheet that requires the date putting in cell G7, I would like it to be automatically inserted when data is inserted to cell C10, so as soon as data is put into C10 the date is copied from C15 and put into G7

    Is that Possible?

    Many Thanks

    Denzil

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This assumes the user changes the cell C10 instead of it being a formula

    Right click "Customer Info" sheet > select view code > paste in the below.
    Change sheet2 to your other sheet

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116

    Smile

    Hi

    Many Thanks for your Reply

    Ive put the code in and changed "sheet 2" To the name of the file "Purchasing programme test" but nothing happens, Im not sure what the code does but it doesnt mention the cell C15 where the date is copied from,
    When I press a button The document above is opened and information is filled in automatically from the workbook. cell c10 is the very first cell that would be filled I thought that be b a good way of triggering the copy of the date across, Hope that makes sense

    Sorry if I didnt explain that well

    Many Thanks

    Denzil

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Sorry try

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116

    Question

    Hi

    THanks for the new code, Im not sure whether or not im doing something wrong but I still cant get it to work,
    Ive added examples for you to see, any advice would be really appreciated

    Many Thanks

    Denzil
    Attached Files Attached Files

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Guess the title should of giving it away.

    As you didn't mention workbook names I just assumed it was dealing with sheets in the same workbook


    Try this in sheet Machine & Customer Details in Front Page.
    C10 seems to be a merged cell say I made it B10

    Note no error checking. So will fail if purchasing workbook is closed
    Please Login or Register  to view this content.
    VBA Noob

  7. #7
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116

    Smile

    Hi

    Many Thanks for your quick response,

    still no joy though, I put it in where you said does it work on the copy I sent to you?

    Many Thanks In advance

    Denzil

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Yes

    See attached

    VBA Noob
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116

    Question

    Hi

    I must being going wrong somewhere, I typed in cell b10 and pressed enter but no date appeared in any cells

    Have you any ideas

    Many Thanks

    Denzil

  10. #10
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Add a message to Front page sheet macro(in red) to see if the macro are triggered.

    Please Login or Register  to view this content.
    You may need to place this in a normal module and run to turn them back on

    Please Login or Register  to view this content.
    VBA Noob

  11. #11
    Forum Contributor
    Join Date
    02-05-2008
    Posts
    116

    Question

    Hi

    Im really sorry about this but it still isnt working, no message nothing

    Any Ideas?

    MAny Thanks

    Denzil

  12. #12
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Start of small and try the first one between sheets. Add the message box

    If that fails read the links
    http://www.mvps.org/dmcritchie/excel/event.htm
    http://www.cpearson.com/excel/Events.aspx

    VBA Noob
    Last edited by VBA Noob; 03-14-2008 at 11:08 AM.

+ 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