+ Reply to Thread
Results 1 to 5 of 5

getting a value from a closed workbook then pasting it on active wrkbk

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Cool getting a value from a closed workbook then pasting it on active wrkbk

    can someone please show me how to:
    Get (copy) a value from range("a1") of a closed workbook, then pasting the value on range("c5") of the active workbook. Then if the value = 12345 then instead of showing 12345, excel will immediately replace it with "i love tennis".

    I'm a beginner at excel vba programming, so i'd reallpy appreciate the help!
    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: getting a value from a closed workbook then pasting it on active wrkbk

    Hi

    Try this:

    Book1.xlsm

    Regards...
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Lightbulb Re: getting a value from a closed workbook then pasting it on active wrkbk

    Thank you very much! It works perfect!
    Just one more thing.... how could you make this macro run continuously? Like if range("a1") of the second workbook is 12345 then the range("c5") of the first wrkbk will immediately show "i love tennis". In other words, the macro will run without you clicking Run.

    again, Thanks!
    Last edited by denvernuggets15; 05-10-2012 at 11:49 PM.

  4. #4
    Registered User
    Join Date
    05-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: getting a value from a closed workbook then pasting it on active wrkbk

    how to you make the value from a1 show up in c5, even if it's not 12345? (cuz now it only shows it when it =12345)?
    Thanks!

  5. #5
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: getting a value from a closed workbook then pasting it on active wrkbk

    Hello,

    Check this out:

    copy data from a closed sheet code.xlsm


    Regards...

+ 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